diff --git a/.github/workflows/ansible-test-integration.yml b/.github/workflows/ansible-test-integration.yml index aff61971..7edecf7e 100644 --- a/.github/workflows/ansible-test-integration.yml +++ b/.github/workflows/ansible-test-integration.yml @@ -49,3 +49,8 @@ jobs: test_stack_name: ${{ secrets.ANSIBLE_TEST_CI_STACK }}" > tests/integration/integration_config.yml env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + org_name: "${{ secrets.ANSIBLE_TEST_ORG_NAME }}" + grafana_cloud_api_key: "${{ secrets.ANSIBLE_TEST_CLOUD_API_KEY }}" + grafana_api_key: "${{ secrets.ANSIBLE_TEST_GRAFANA_API_KEY }}" + grafana_url: "${{ secrets.ANSIBLE_GRAFANA_URL }}" + test_stack_name: "${{ secrets.ANSIBLE_TEST_CI_STACK }}" diff --git a/tests/integration/targets/create_cloud_stack/tasks/main.yml b/tests/integration/targets/create_cloud_stack/tasks/main.yml index 642b528b..c0bf2515 100644 --- a/tests/integration/targets/create_cloud_stack/tasks/main.yml +++ b/tests/integration/targets/create_cloud_stack/tasks/main.yml @@ -1,17 +1,17 @@ --- - name: Create a Grafana Cloud stack grafana.grafana.cloud_stack: - name: "{{ test_stack_name }}" - stack_slug: "{{ test_stack_name }}" - cloud_api_key: "{{ grafana_cloud_api_key }}" - org_slug: "{{ org_name }}" + name: "{{ lookup('ansible.builtin.env', 'test_stack_name') }}" + stack_slug: "{{ lookup('ansible.builtin.env', 'test_stack_name') }}" + cloud_api_key: "{{ lookup('ansible.builtin.env', 'grafana_cloud_api_key') }}" + org_slug: "{{ lookup('ansible.builtin.env', 'org_name') }}" state: present register: create_result - name: Create Check ansible.builtin.assert: that: - - create_result.url == "https://" + "{{ test_stack_name }}" + ".grafana.net" + - create_result.url == "https://" + "{{ lookup('ansible.builtin.env', 'test_stack_name') }}" + ".grafana.net" - name: Sleep for 45 seconds ansible.builtin.wait_for: