Skip to content

Commit

Permalink
replace deprecated includes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Oct 4, 2023
1 parent 7b1f0a0 commit 99f569e
Show file tree
Hide file tree
Showing 116 changed files with 816 additions and 816 deletions.
8 changes: 4 additions & 4 deletions tests/checks/check-branch-sha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
url: "{{ url }}"
expected_content: "LAGOON_GIT_SHA={{ expected_head }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the branch name"
hosts: localhost
Expand All @@ -14,7 +14,7 @@
url: "{{ url }}"
expected_content: "LAGOON_GIT_BRANCH={{ expected_branch }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml
when: expected_branch != ""

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash inside an environment variable set during buildtime"
Expand All @@ -24,7 +24,7 @@
url: "{{ url }}"
expected_content: "LAGOON_GIT_SHA_BUILDTIME={{ expected_head }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the branch name inside an environment variable set during buildtime"
hosts: localhost
Expand All @@ -33,4 +33,4 @@
url: "{{ url }}"
expected_content: "LAGOON_GIT_BRANCH_BUILDTIME={{ expected_branch_buildtime | default(expected_branch) }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml
12 changes: 6 additions & 6 deletions tests/checks/check-deployed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
url: "{{ url }}"
expected_content: "LAGOON_GIT_SHA={{ expected_head }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the branch name"
hosts: localhost
Expand All @@ -14,7 +14,7 @@
url: "{{ url }}"
expected_content: "LAGOON_GIT_BRANCH={{ expected_branch }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash inside an environment variable set during buildtime"
hosts: localhost
Expand All @@ -23,7 +23,7 @@
url: "{{ url }}"
expected_content: "LAGOON_GIT_SHA_BUILDTIME={{ expected_head }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the branch name inside an environment variable set during buildtime"
hosts: localhost
Expand All @@ -32,7 +32,7 @@
url: "{{ url }}"
expected_content: "LAGOON_GIT_BRANCH_BUILDTIME={{ expected_branch }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the env variable set by .env file"
hosts: localhost
Expand All @@ -41,7 +41,7 @@
url: "{{ url }}"
expected_content: "VARIABLE_SET_BY_DOTENV=true"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for the env variable set by .env.defaults file"
hosts: localhost
Expand All @@ -50,4 +50,4 @@
url: "{{ url }}"
expected_content: "VARIABLE_SET_BY_DOTENV_DEFAULTS=true"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml
18 changes: 9 additions & 9 deletions tests/checks/check-pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
url: "{{ url }}"
expected_content: "LAGOON_BUILD_TYPE_BUILDTIME={{ expected_build_type }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for LAGOON_PR_HEAD_BRANCH_BUILDTIME={{ expected_pr_head_branch }}"
hosts: localhost
Expand All @@ -14,7 +14,7 @@
url: "{{ url }}"
expected_content: "LAGOON_PR_HEAD_BRANCH_BUILDTIME={{ expected_pr_head_branch }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for LAGOON_PR_HEAD_BRANCH={{ expected_pr_head_branch }}"
hosts: localhost
Expand All @@ -23,7 +23,7 @@
url: "{{ url }}"
expected_content: "LAGOON_PR_HEAD_BRANCH={{ expected_pr_head_branch }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for LAGOON_PR_HEAD_SHA_BUILDTIME={{ expected_pr_head_sha }}"
hosts: localhost
Expand All @@ -32,7 +32,7 @@
url: "{{ url }}"
expected_content: "LAGOON_PR_HEAD_SHA_BUILDTIME={{ expected_pr_head_sha }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for LAGOON_PR_BASE_BRANCH_BUILDTIME={{ expected_pr_base_branch }}"
hosts: localhost
Expand All @@ -41,7 +41,7 @@
url: "{{ url }}"
expected_content: "LAGOON_PR_BASE_BRANCH_BUILDTIME={{ expected_pr_base_branch }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for LAGOON_PR_BASE_BRANCH={{ expected_pr_base_branch }}"
hosts: localhost
Expand All @@ -50,7 +50,7 @@
url: "{{ url }}"
expected_content: "LAGOON_PR_BASE_BRANCH={{ expected_pr_base_branch }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for LAGOON_PR_BASE_SHA_BUILDTIME={{ expected_pr_base_sha }}"
hosts: localhost
Expand All @@ -59,7 +59,7 @@
url: "{{ url }}"
expected_content: "LAGOON_PR_BASE_SHA_BUILDTIME={{ expected_pr_base_sha }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for LAGOON_PR_TITLE_BUILDTIME={{ expected_pr_title }}"
hosts: localhost
Expand All @@ -68,7 +68,7 @@
url: "{{ url }}"
expected_content: "LAGOON_PR_TITLE_BUILDTIME={{ expected_pr_title }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml

- name: "{{ testname }} - check if {{ project }} is deployed with searching for LAGOON_PR_TITLE={{ expected_pr_title }}"
hosts: localhost
Expand All @@ -77,4 +77,4 @@
url: "{{ url }}"
expected_content: "LAGOON_PR_TITLE={{ expected_pr_title }}"
tasks:
- include: check-url-content.yaml
- ansible.builtin.include_tasks: check-url-content.yaml
2 changes: 1 addition & 1 deletion tests/tasks/api/add-deploytarget.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "Add deploy target to project {{ project }}"
block:
- include: refresh-token.yaml
- ansible.builtin.include_tasks: refresh-token.yaml
- name: "{{ testname }} - POST api get project by name with target project {{ project }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand Down
4 changes: 2 additions & 2 deletions tests/tasks/api/add-environment-variable.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "{{ testname }} - POST api add envVariable with target environment {{ branch }} on project {{ project }} to {{ graphql_url }}"
block:
- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "{{ testname }} - POST api add envVariable with target environment {{ branch }} on project {{ project }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand All @@ -17,4 +17,4 @@
msg: "api response: {{ apiresponse.json }}"
- fail:
msg: "error adding environment variable"
when: apiresponse.json.data.addOrUpdateEnvVariableByName.name is not defined
when: apiresponse.json.data.addOrUpdateEnvVariableByName.name is not defined
2 changes: 1 addition & 1 deletion tests/tasks/api/add-environment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "Add environment {{ name }} to project {{ project }}"
block:
- include: refresh-token.yaml
- ansible.builtin.include_tasks: refresh-token.yaml
- name: "{{ testname }} - POST api get project by name with target project {{ project }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand Down
4 changes: 2 additions & 2 deletions tests/tasks/api/add-project-variable.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "{{ testname }} - POST api add envVariable with target project {{ project }} to {{ graphql_url }}"
block:
- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "{{ testname }} - POST api add envVariable with target project {{ project }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand All @@ -16,4 +16,4 @@
msg: "api response: {{ apiresponse.json }}"
- fail:
msg: "error adding environment variable"
when: apiresponse.json.data.addOrUpdateEnvVariableByName.name is not defined
when: apiresponse.json.data.addOrUpdateEnvVariableByName.name is not defined
2 changes: 1 addition & 1 deletion tests/tasks/api/add-project.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "Add project {{ project }} to openshift {{ openshift }}"
block:
- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "Add project {{ project }} to openshift {{ openshift }}"
uri:
url: "{{ graphql_url }}"
Expand Down
4 changes: 2 additions & 2 deletions tests/tasks/api/delete-environment-variable.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "{{ testname }} - POST api delete envVariable with target environment {{ branch }} on project {{ project }} to {{ graphql_url }}"
block:
- include: refresh-token.yaml
- ansible.builtin.include_tasks: refresh-token.yaml
- name: "{{ testname }} - POST api delete envVariable with target environment {{ branch }} on project {{ project }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand All @@ -17,4 +17,4 @@
msg: "api response: {{ apiresponse.json }}"
- fail:
msg: "error deleting environment variable"
when: apiresponse.json.errors[0].message is defined and apiresponse.json.errors[0].message is not search("doesn't exist")
when: apiresponse.json.errors[0].message is defined and apiresponse.json.errors[0].message is not search("doesn't exist")
2 changes: 1 addition & 1 deletion tests/tasks/api/delete-environment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ branch }} to {{ graphql_url }}"
block:
- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "{{ testname }} - POST api deleteEnvironment with project {{ project }} and branch {{ branch }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand Down
4 changes: 2 additions & 2 deletions tests/tasks/api/delete-project-variable.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "{{ testname }} - POST api delete envVariable with target project {{ project }} to {{ graphql_url }}"
block:
- include: refresh-token.yaml
- ansible.builtin.include_tasks: refresh-token.yaml
- name: "{{ testname }} - POST api delete envVariable with target project {{ project }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand All @@ -16,4 +16,4 @@
msg: "api response: {{ apiresponse.json }}"
- fail:
msg: "error deleting environment variable"
when: apiresponse.json.data.deleteEnvVariableByName != "success"
when: apiresponse.json.data.deleteEnvVariableByName != "success"
2 changes: 1 addition & 1 deletion tests/tasks/api/delete-project.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "Delete project {{ project }} from openshift {{ openshift }}"
block:
- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "Delete project {{ project }} from openshift {{ openshift }}"
uri:
url: "{{ graphql_url }}"
Expand Down
4 changes: 2 additions & 2 deletions tests/tasks/api/deploy-bulk-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "{{ testname }} - Trigger a bulk deployment for environments to {{ graphql_url }}"
block:
- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "{{ testname }} - create the bulk deployment environments input"
set_fact:
environments: >
Expand All @@ -21,4 +21,4 @@
debug:
msg: "api response: {{ apiresponse.json }}"
- set_fact:
bulk_deploy_id: "{{ apiresponse.json.data.bulkDeployEnvironmentLatest }}"
bulk_deploy_id: "{{ apiresponse.json.data.bulkDeployEnvironmentLatest }}"
2 changes: 1 addition & 1 deletion tests/tasks/api/deploy-no-sha.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "Start deployEnvironmentBranch (no SHA) loop with 3 retries"
block:
- include: refresh-token.yaml
- ansible.builtin.include_tasks: refresh-token.yaml
- name: "Set the retry count to {{ retry_count }}"
set_fact:
retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}"
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/api/deploy-pullrequest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "Start deployEnvironmentPullrequest loop with 3 retries"
block:
- include: refresh-token.yaml
- ansible.builtin.include_tasks: refresh-token.yaml
- name: "Set the retry count to {{ retry_count }}"
set_fact:
retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}"
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/api/deploy-sha.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "Start deployEnvironmentBranch (SHA) loop with 3 retries"
block:
- include: refresh-token.yaml
- ansible.builtin.include_tasks: refresh-token.yaml
- name: "Set the retry count to {{ retry_count }}"
set_fact:
retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}"
Expand Down
6 changes: 3 additions & 3 deletions tests/tasks/api/get-bulk-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "{{ testname }} - Trigger a bulk deployment for environments to {{ graphql_url }}"
block:
- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- debug:
msg: "{{ bulk_deploy_id }}"
- name: "{{ testname }} - POST api check new bulk deployments for environments to {{ graphql_url }}"
Expand All @@ -23,7 +23,7 @@
retries: 30
delay: 10

- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "{{ testname }} - POST api check running bulk deployments for environments to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand All @@ -44,7 +44,7 @@
retries: 60
delay: 10

- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "{{ testname }} - POST api check completed bulk deployments for environments to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/api/promote.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "{{ testname }} - POST api deployEnvironmentPromote with source environment {{ source_environment }}, target environment {{ promote_environment }} and project {{ project }} to {{ graphql_url }}"
block:
- include: refresh-token.yaml
- ansible.builtin.include_tasks: refresh-token.yaml
- name: "{{ testname }} - POST api deployEnvironmentPromote with source environment {{ source_environment }}, target environment {{ promote_environment }} and project {{ project }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/api/update-project-routerpattern.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: "Update project routerpattern for {{ project }} to openshift {{ openshift }}"
block:
- include: admin-token.yaml
- ansible.builtin.include_tasks: admin-token.yaml
- name: "{{ testname }} - POST api get project by name with target project {{ project }} to {{ graphql_url }}"
uri:
url: "{{ graphql_url }}"
Expand Down
8 changes: 4 additions & 4 deletions tests/tests/active-standby-kubernetes.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
- include: features/api-token.yaml
- ansible.builtin.import_playbook: features/api-token.yaml
vars:
testname: "API TOKEN"

- include: api/add-project.yaml
- ansible.builtin.import_playbook: api/add-project.yaml
vars:
project: ci-active-standby-{{ cluster_type }}
git_repo_name: active-standby.git
git_url: "{{ localgit_url }}/{{ git_repo_name }}"
prod_env: master-a
standby_env: master-b

- include: active-standby/active-standby.yaml
- ansible.builtin.import_playbook: active-standby/active-standby.yaml
vars:
testname: "ACTIVE_STANDBY"
git_repo_name: active-standby.git
Expand All @@ -20,6 +20,6 @@
standby_branch: master-b
error_code_check: 404

- include: api/delete-project.yaml
- ansible.builtin.import_playbook: api/delete-project.yaml
vars:
project: ci-active-standby-{{ cluster_type }}
Loading

0 comments on commit 99f569e

Please sign in to comment.