diff --git a/tests/Dockerfile b/tests/Dockerfile index 14fab3ae9e..00ce6993fe 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,6 +1,6 @@ ARG UPSTREAM_REPO ARG UPSTREAM_TAG -FROM ${UPSTREAM_REPO:-uselagoon}/python-3.10:${UPSTREAM_TAG:-latest} +FROM ${UPSTREAM_REPO:-uselagoon}/python-3.11:${UPSTREAM_TAG:-latest} RUN apk add --no-cache \ bash \ @@ -24,7 +24,7 @@ RUN apk add --no-cache --virtual .build-deps \ && pip3 install -r requirements.txt \ && apk del .build-deps -RUN ansible-galaxy collection install ansible.posix community.general kubernetes.core +RUN ansible-galaxy collection install -vvv ansible.posix community.general kubernetes.core # download, extract and install kubectl binary ENV KUBECTL_VER=v1.25.5 diff --git a/tests/ansible.cfg b/tests/ansible.cfg index 0e90c03143..3ee9b5a367 100644 --- a/tests/ansible.cfg +++ b/tests/ansible.cfg @@ -5,7 +5,4 @@ host_key_checking = False deprecation_warnings = False interpreter_python = auto_silent callback_whitelist = profile_tasks - -[galaxy] -server = https://old-galaxy.ansible.com/ -;server = https://galaxy.ansible.com/ +callbacks_enabled=ansible.posix.profile_tasks diff --git a/tests/checks/check-branch-sha.yaml b/tests/checks/check-branch-sha.yaml index c3fd86c384..ecf6966098 100644 --- a/tests/checks/check-branch-sha.yaml +++ b/tests/checks/check-branch-sha.yaml @@ -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 @@ -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" @@ -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 @@ -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 diff --git a/tests/checks/check-deployed.yaml b/tests/checks/check-deployed.yaml index e4a9eb563c..99978581f0 100644 --- a/tests/checks/check-deployed.yaml +++ b/tests/checks/check-deployed.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/tests/checks/check-pullrequest.yaml b/tests/checks/check-pullrequest.yaml index 6f9d32ffd2..574ca00b17 100644 --- a/tests/checks/check-pullrequest.yaml +++ b/tests/checks/check-pullrequest.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -77,4 +77,4 @@ url: "{{ url }}" expected_content: "LAGOON_PR_TITLE={{ expected_pr_title }}" tasks: - - include: check-url-content.yaml \ No newline at end of file + - ansible.builtin.include_tasks: check-url-content.yaml diff --git a/tests/requirements.txt b/tests/requirements.txt index fa3fa8e49a..867ed9f207 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ -ansible-core==2.11.12 +ansible-core==2.15.4 jmespath==1.0.1 kubernetes==25.3.0 PyJWT==2.6.0 diff --git a/tests/tasks/api/add-deploytarget.yaml b/tests/tasks/api/add-deploytarget.yaml index 52ae0c3ed3..d1961967c1 100644 --- a/tests/tasks/api/add-deploytarget.yaml +++ b/tests/tasks/api/add-deploytarget.yaml @@ -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 }}" diff --git a/tests/tasks/api/add-environment-variable.yaml b/tests/tasks/api/add-environment-variable.yaml index 6d01eb884d..d6f2ec4293 100644 --- a/tests/tasks/api/add-environment-variable.yaml +++ b/tests/tasks/api/add-environment-variable.yaml @@ -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 }}" @@ -17,4 +17,4 @@ msg: "api response: {{ apiresponse.json }}" - fail: msg: "error adding environment variable" - when: apiresponse.json.data.addOrUpdateEnvVariableByName.name is not defined \ No newline at end of file + when: apiresponse.json.data.addOrUpdateEnvVariableByName.name is not defined diff --git a/tests/tasks/api/add-environment.yaml b/tests/tasks/api/add-environment.yaml index e92bc7fef6..741d8b05cd 100644 --- a/tests/tasks/api/add-environment.yaml +++ b/tests/tasks/api/add-environment.yaml @@ -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 }}" diff --git a/tests/tasks/api/add-project-variable.yaml b/tests/tasks/api/add-project-variable.yaml index 363fa043e1..1dd86bbc56 100644 --- a/tests/tasks/api/add-project-variable.yaml +++ b/tests/tasks/api/add-project-variable.yaml @@ -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 }}" @@ -16,4 +16,4 @@ msg: "api response: {{ apiresponse.json }}" - fail: msg: "error adding environment variable" - when: apiresponse.json.data.addOrUpdateEnvVariableByName.name is not defined \ No newline at end of file + when: apiresponse.json.data.addOrUpdateEnvVariableByName.name is not defined diff --git a/tests/tasks/api/add-project.yaml b/tests/tasks/api/add-project.yaml index 4969b9d958..0f3eee170e 100644 --- a/tests/tasks/api/add-project.yaml +++ b/tests/tasks/api/add-project.yaml @@ -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 }}" diff --git a/tests/tasks/api/delete-environment-variable.yaml b/tests/tasks/api/delete-environment-variable.yaml index 003fc9a82d..4dee6538af 100644 --- a/tests/tasks/api/delete-environment-variable.yaml +++ b/tests/tasks/api/delete-environment-variable.yaml @@ -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 }}" @@ -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") \ No newline at end of file + when: apiresponse.json.errors[0].message is defined and apiresponse.json.errors[0].message is not search("doesn't exist") diff --git a/tests/tasks/api/delete-environment.yaml b/tests/tasks/api/delete-environment.yaml index 8d3ad9204c..50e3dd1d74 100644 --- a/tests/tasks/api/delete-environment.yaml +++ b/tests/tasks/api/delete-environment.yaml @@ -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 }}" diff --git a/tests/tasks/api/delete-project-variable.yaml b/tests/tasks/api/delete-project-variable.yaml index 3fa0f1ad24..6eeea35c95 100644 --- a/tests/tasks/api/delete-project-variable.yaml +++ b/tests/tasks/api/delete-project-variable.yaml @@ -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 }}" @@ -16,4 +16,4 @@ msg: "api response: {{ apiresponse.json }}" - fail: msg: "error deleting environment variable" - when: apiresponse.json.data.deleteEnvVariableByName != "success" \ No newline at end of file + when: apiresponse.json.data.deleteEnvVariableByName != "success" diff --git a/tests/tasks/api/delete-project.yaml b/tests/tasks/api/delete-project.yaml index 48eb2a482d..852ccd9a67 100644 --- a/tests/tasks/api/delete-project.yaml +++ b/tests/tasks/api/delete-project.yaml @@ -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 }}" diff --git a/tests/tasks/api/deploy-bulk-deployment.yaml b/tests/tasks/api/deploy-bulk-deployment.yaml index f4ce9c0b4e..58f8b1e448 100644 --- a/tests/tasks/api/deploy-bulk-deployment.yaml +++ b/tests/tasks/api/deploy-bulk-deployment.yaml @@ -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: > @@ -21,4 +21,4 @@ debug: msg: "api response: {{ apiresponse.json }}" - set_fact: - bulk_deploy_id: "{{ apiresponse.json.data.bulkDeployEnvironmentLatest }}" \ No newline at end of file + bulk_deploy_id: "{{ apiresponse.json.data.bulkDeployEnvironmentLatest }}" diff --git a/tests/tasks/api/deploy-no-sha.yaml b/tests/tasks/api/deploy-no-sha.yaml index 99b79687ba..4f2bdd7ce8 100644 --- a/tests/tasks/api/deploy-no-sha.yaml +++ b/tests/tasks/api/deploy-no-sha.yaml @@ -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 }}" diff --git a/tests/tasks/api/deploy-pullrequest.yaml b/tests/tasks/api/deploy-pullrequest.yaml index ab46c84e0e..d66c06cf19 100644 --- a/tests/tasks/api/deploy-pullrequest.yaml +++ b/tests/tasks/api/deploy-pullrequest.yaml @@ -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 }}" diff --git a/tests/tasks/api/deploy-sha.yaml b/tests/tasks/api/deploy-sha.yaml index 19b241d398..28fcf6b53e 100644 --- a/tests/tasks/api/deploy-sha.yaml +++ b/tests/tasks/api/deploy-sha.yaml @@ -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 }}" diff --git a/tests/tasks/api/get-bulk-deployment.yaml b/tests/tasks/api/get-bulk-deployment.yaml index d548c7c083..bcf350b77b 100644 --- a/tests/tasks/api/get-bulk-deployment.yaml +++ b/tests/tasks/api/get-bulk-deployment.yaml @@ -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 }}" @@ -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 }}" @@ -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 }}" diff --git a/tests/tasks/api/promote.yaml b/tests/tasks/api/promote.yaml index c9a170f427..d39f73a1ce 100644 --- a/tests/tasks/api/promote.yaml +++ b/tests/tasks/api/promote.yaml @@ -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 }}" diff --git a/tests/tasks/api/update-project-routerpattern.yaml b/tests/tasks/api/update-project-routerpattern.yaml index f7734d84fc..38584c5e72 100644 --- a/tests/tasks/api/update-project-routerpattern.yaml +++ b/tests/tasks/api/update-project-routerpattern.yaml @@ -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 }}" diff --git a/tests/tests/active-standby-kubernetes.yaml b/tests/tests/active-standby-kubernetes.yaml index 6435fa22ac..884faebc91 100644 --- a/tests/tests/active-standby-kubernetes.yaml +++ b/tests/tests/active-standby-kubernetes.yaml @@ -1,9 +1,9 @@ --- -- 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 @@ -11,7 +11,7 @@ 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 @@ -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 }} diff --git a/tests/tests/active-standby/active-standby.yaml b/tests/tests/active-standby/active-standby.yaml index e5f84c9b06..41a51de508 100644 --- a/tests/tests/active-standby/active-standby.yaml +++ b/tests/tests/active-standby/active-standby.yaml @@ -6,8 +6,8 @@ git_files: "active-standby/first/" branch: "{{ prod_branch }}" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - active branch api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -17,7 +17,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ prod_branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - standby branch init git, add files, commit, git push" hosts: localhost @@ -26,7 +26,7 @@ git_files: "active-standby/second/" branch: "{{ standby_branch }}" tasks: - - include: git-add-commit-push.yaml + - ansible.builtin.include_tasks: git-add-commit-push.yaml - name: "{{ testname }} - standby branch api deployEnvironmentBranch {{ standby_branch }} on {{ project }}, which should deploy the first commit" hosts: localhost @@ -36,9 +36,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ standby_branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: pre-switch-check.yaml +- ansible.builtin.import_playbook: pre-switch-check.yaml vars: expected_head: "{{ current_head }}" project: "{{ project }}" @@ -49,9 +49,9 @@ vars: project: "{{ project }}" tasks: - - include: deploy-active-standby.yaml + - ansible.builtin.include_tasks: deploy-active-standby.yaml -- include: post-switch-check.yaml +- ansible.builtin.import_playbook: post-switch-check.yaml vars: expected_head: "{{ current_head }}" project: "{{ project }}" @@ -63,7 +63,7 @@ project: "{{ project }}" branch: "{{ prod_branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if {{ prod_branch }} for {{ project }} does not exist anymore" hosts: localhost @@ -72,7 +72,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ prod_branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: "{{ error_code_check }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - api deleteEnvironment {{ standby_branch }} on {{ project }}, which should remove all resources" hosts: localhost @@ -81,7 +81,7 @@ project: "{{ project }}" branch: "{{ standby_branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if {{ standby_branch }} for {{ project }} does not exist anymore" hosts: localhost @@ -90,4 +90,4 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: "{{ error_code_check }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/active-standby/deploy-active-standby.yaml b/tests/tests/active-standby/deploy-active-standby.yaml index e6eb30ad92..494c8e14ac 100644 --- a/tests/tests/active-standby/deploy-active-standby.yaml +++ b/tests/tests/active-standby/deploy-active-standby.yaml @@ -1,6 +1,6 @@ - name: "{{ testname }} - POST api switchActiveStandby with target project {{ project }} (no sha) to {{ graphql_url }}" block: - - include: ../../tasks/api/refresh-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/refresh-token.yaml - name: "{{ testname }} - POST api switchActiveStandby with target git branch {{ standby_branch }} and project {{ project }} (no sha) to {{ graphql_url }}" uri: url: "{{ graphql_url }}" diff --git a/tests/tests/active-standby/post-switch-check.yaml b/tests/tests/active-standby/post-switch-check.yaml index e449a3b266..313b05e1bb 100644 --- a/tests/tests/active-standby/post-switch-check.yaml +++ b/tests/tests/active-standby/post-switch-check.yaml @@ -5,7 +5,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ prod_branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'Standby Hello World!' on {{ standby_branch }}" hosts: localhost @@ -14,7 +14,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Standby Hello World!" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if custom domain 'active-moving-route.com' is created and allows secure traffic" hosts: localhost @@ -24,7 +24,7 @@ host: "active-moving-route.com" expected_content: "Standby Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'standby-moving-route.com' is created and allows secure traffic" hosts: localhost @@ -34,4 +34,4 @@ host: "standby-moving-route.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml diff --git a/tests/tests/active-standby/pre-switch-check.yaml b/tests/tests/active-standby/pre-switch-check.yaml index 8abc825890..d29ae42a9f 100644 --- a/tests/tests/active-standby/pre-switch-check.yaml +++ b/tests/tests/active-standby/pre-switch-check.yaml @@ -5,7 +5,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ prod_branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'Standby Hello World!' on {{ standby_branch }}" hosts: localhost @@ -14,7 +14,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ standby_branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Standby Hello World!" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if custom domain 'active-moving-route.com' is created and allows secure traffic" hosts: localhost @@ -24,7 +24,7 @@ host: "active-moving-route.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'standby-moving-route.com' is created and allows secure traffic" hosts: localhost @@ -34,4 +34,4 @@ host: "standby-moving-route.com" expected_content: "Standby Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml diff --git a/tests/tests/api.yaml b/tests/tests/api.yaml index 7efe7464fb..c93baec00a 100644 --- a/tests/tests/api.yaml +++ b/tests/tests/api.yaml @@ -1,15 +1,15 @@ --- -- 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-api-{{ cluster_type }} git_repo_name: api.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: api/deploy-pullrequest.yaml +- ansible.builtin.import_playbook: api/deploy-pullrequest.yaml vars: testname: "API {{ cluster_type|upper }} - deploy pullrequest" node_version: 16 @@ -17,7 +17,7 @@ project: ci-api-{{ cluster_type }} check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ route_suffix }}" -- include: api/deploy-branch.yaml +- ansible.builtin.import_playbook: api/deploy-branch.yaml vars: testname: "API {{ cluster_type|upper }} - deploy regular branch api/slash/branch" node_version: 16 @@ -26,7 +26,7 @@ branch: api/slash/branch check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: api/deploy-branch-once.yaml +# - ansible.builtin.import_playbook: api/deploy-branch-once.yaml # vars: # testname: "API {{ cluster_type|upper }} - deploy regular branch, name ends with -" # node_version: 16 @@ -35,7 +35,7 @@ # branch: some-branch-name- # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: api/deploy-branch-once.yaml +# - ansible.builtin.import_playbook: api/deploy-branch-once.yaml # vars: # testname: "API {{ cluster_type|upper }} - deploy regular branch, name contains only numbers" # node_version: 16 @@ -44,7 +44,7 @@ # branch: 1234567890 # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: api/deploy-branch-once.yaml +# - ansible.builtin.import_playbook: api/deploy-branch-once.yaml # vars: # testname: "API {{ cluster_type|upper }} - deploy regular branch, name contains --" # node_version: 16 @@ -53,7 +53,7 @@ # branch: api--branch # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/promote.yaml +- ansible.builtin.import_playbook: api/promote.yaml vars: testname: "API {{ cluster_type|upper }} - promote branch" node_version: 16 @@ -64,6 +64,6 @@ check_url_source: "https://node.{{ project | regex_replace('_', '-') }}.{{ source_environment | regex_replace('/', '-') }}.{{ route_suffix_https }}" check_url_promote: "https://node.{{ project | regex_replace('_', '-') }}.{{ promote_environment | regex_replace('/', '-') }}.{{ route_suffix_https }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-api-{{ cluster_type }} diff --git a/tests/tests/api/add-deploytarget.yaml b/tests/tests/api/add-deploytarget.yaml index f15d28a2b5..abc90fe376 100644 --- a/tests/tests/api/add-deploytarget.yaml +++ b/tests/tests/api/add-deploytarget.yaml @@ -7,4 +7,4 @@ branches_regex: "{{ branches_regex }}" pullrequests_regex: "{{ pullrequests_regex }}" tasks: - - include: ../../tasks/api/add-deploytarget.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-deploytarget.yaml diff --git a/tests/tests/api/add-environment.yaml b/tests/tests/api/add-environment.yaml index fbb800beca..f253481d7c 100644 --- a/tests/tests/api/add-environment.yaml +++ b/tests/tests/api/add-environment.yaml @@ -9,4 +9,4 @@ deployBaseRef: "{{ name }}" environmentType: "{{ environmentType }}" tasks: - - include: ../../tasks/api/add-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-environment.yaml diff --git a/tests/tests/api/add-project-variable.yaml b/tests/tests/api/add-project-variable.yaml index 174f5fc294..a9e5d901b7 100644 --- a/tests/tests/api/add-project-variable.yaml +++ b/tests/tests/api/add-project-variable.yaml @@ -8,4 +8,4 @@ envValue: "newlagoon:true" envScope: "BUILD" tasks: - - include: ../../tasks/api/add-project-variable.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../tasks/api/add-project-variable.yaml diff --git a/tests/tests/api/add-project.yaml b/tests/tests/api/add-project.yaml index b5a45d6015..b74a6afba6 100644 --- a/tests/tests/api/add-project.yaml +++ b/tests/tests/api/add-project.yaml @@ -10,4 +10,4 @@ standbyenv: "{{ standby_env | default('') }}" openshift: 2001 tasks: - - include: ../../tasks/api/add-project.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-project.yaml diff --git a/tests/tests/api/delete-project.yaml b/tests/tests/api/delete-project.yaml index 7e31ee0af7..6545f2f818 100644 --- a/tests/tests/api/delete-project.yaml +++ b/tests/tests/api/delete-project.yaml @@ -6,4 +6,4 @@ project: "{{ project }}" openshift: 2001 tasks: - - include: ../../tasks/api/delete-project.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-project.yaml diff --git a/tests/tests/api/deploy-branch-once.yaml b/tests/tests/api/deploy-branch-once.yaml index 55668251c9..8144eac734 100644 --- a/tests/tests/api/deploy-branch-once.yaml +++ b/tests/tests/api/deploy-branch-once.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -32,7 +32,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -41,4 +41,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/api/deploy-branch.yaml b/tests/tests/api/deploy-branch.yaml index aac5b65304..cd1f564c8f 100644 --- a/tests/tests/api/deploy-branch.yaml +++ b/tests/tests/api/deploy-branch.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -29,7 +29,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - set_fact: second_commit_hash: "{{ current_head }}" @@ -37,7 +37,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch with sha of second commit on {{ project }}, which should deploy the second commit" hosts: localhost @@ -48,10 +48,10 @@ sha: "{{ second_commit_hash }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ second_commit_hash }}" expected_branch: "{{ branch }}" @@ -66,9 +66,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -84,9 +84,9 @@ sha: "{{ second_commit_hash }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ second_commit_hash }}" expected_branch: "{{ branch }}" @@ -100,7 +100,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -109,4 +109,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/api/deploy-pullrequest.yaml b/tests/tests/api/deploy-pullrequest.yaml index 62121c4a6c..89cc96d19a 100644 --- a/tests/tests/api/deploy-pullrequest.yaml +++ b/tests/tests/api/deploy-pullrequest.yaml @@ -6,8 +6,8 @@ git_files: "node{{ node_version }}/" branch: "pullrequest_base" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - save base branch commit" hosts: localhost @@ -22,7 +22,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -43,10 +43,10 @@ git_pr_title: "PR Title" namespace: "{{ project | regex_replace('_', '-') }}-pr-1" tasks: - - include: ../../tasks/api/deploy-pullrequest.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-pullrequest.yaml -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -62,7 +62,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -83,9 +83,9 @@ git_pr_title: "PR Title - UPDATE" namespace: "{{ project | regex_replace('_', '-') }}-pr-1" tasks: - - include: ../../tasks/api/deploy-pullrequest.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-pullrequest.yaml -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -102,7 +102,7 @@ project: "{{ project }}" branch: "pr-1" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -111,4 +111,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/api/promote.yaml b/tests/tests/api/promote.yaml index fbf797d0a0..6e066f5efb 100644 --- a/tests/tests/api/promote.yaml +++ b/tests/tests/api/promote.yaml @@ -5,8 +5,8 @@ git_files: "node{{ node_version }}/" branch: "{{ source_environment }}" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }} for branch {{ source_environment }}, which will deploy our source environment" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project }}-{{ source_environment }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ source_environment }}" @@ -33,9 +33,9 @@ source_environment: "{{ source_environment }}" project: "{{ project }}" tasks: - - include: ../../tasks/api/promote.yaml + - ansible.builtin.include_tasks: ../../tasks/api/promote.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "" @@ -50,7 +50,7 @@ project: "{{ project }}" branch: "{{ promote_environment }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -59,7 +59,7 @@ project: "{{ project }}" branch: "{{ source_environment }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -68,7 +68,7 @@ url: "{{ check_url_promote }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -77,4 +77,4 @@ url: "{{ check_url_source }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/api/push.yaml b/tests/tests/api/push.yaml index 13c751b223..37ba1b4b5f 100644 --- a/tests/tests/api/push.yaml +++ b/tests/tests/api/push.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -#- include: ../../checks/check-branch-sha.yaml +#- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml # # when: # # - expected_status != "500" # vars: diff --git a/tests/tests/bitbucket.yaml b/tests/tests/bitbucket.yaml index 379b0f1af3..7cd53ffe07 100644 --- a/tests/tests/bitbucket.yaml +++ b/tests/tests/bitbucket.yaml @@ -1,11 +1,11 @@ --- -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-bitbucket-{{ cluster_type }} git_repo_name: bitbucket.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: bitbucket/branch.yaml +- ansible.builtin.import_playbook: bitbucket/branch.yaml vars: testname: "BITBUCKET {{ cluster_type|upper }} - slash branch" node_version: 16 @@ -17,7 +17,7 @@ branch: bitbucket/slash/branch check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: github/skip-deployment.yaml +- ansible.builtin.import_playbook: github/skip-deployment.yaml vars: testname: "BITBUCKET {{ cluster_type|upper }} - skip deployment" node_version: 16 @@ -29,7 +29,7 @@ branch: skip check_url: "http://node.{{ project | regex_replace('_', '-') }}.skip.{{ route_suffix }}" -- include: bitbucket/pullrequest.yaml +- ansible.builtin.import_playbook: bitbucket/pullrequest.yaml vars: testname: "BITBUCKET {{ cluster_type|upper }} - PULLREQUEST" node_version: 16 @@ -40,6 +40,6 @@ project: ci-bitbucket-{{ cluster_type }} check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-2.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-bitbucket-{{ cluster_type }} diff --git a/tests/tests/bitbucket/branch.yaml b/tests/tests/bitbucket/branch.yaml index b5c66f908a..c125736b2a 100644 --- a/tests/tests/bitbucket/branch.yaml +++ b/tests/tests/bitbucket/branch.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - webhook bitbucket push first commit hash to repo" hosts: localhost @@ -15,10 +15,10 @@ git_hash_push: "{{ current_head }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-bitbucket/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -29,7 +29,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - webhook bitbucket push second commit hash to repo" hosts: localhost @@ -38,9 +38,9 @@ git_hash_push: "{{ current_head }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-bitbucket/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -51,7 +51,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - set_fact: third_commit_hash: "{{ current_head }}" @@ -60,7 +60,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - webhook bitbucket push for third commit (fourth commit exists but will not yet be deployed)" hosts: localhost @@ -69,9 +69,9 @@ git_hash_push: "{{ third_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-bitbucket/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ third_commit_hash }}" expected_branch: "{{ branch }}" @@ -84,7 +84,7 @@ vars: git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-bitbucket/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/push-delete.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -93,4 +93,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/bitbucket/pullrequest.yaml b/tests/tests/bitbucket/pullrequest.yaml index 1605f65475..0e639dc7f7 100644 --- a/tests/tests/bitbucket/pullrequest.yaml +++ b/tests/tests/bitbucket/pullrequest.yaml @@ -6,8 +6,8 @@ git_files: "node{{ node_version }}/" branch: "pullrequest_base" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - save base branch commit" hosts: localhost @@ -22,7 +22,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -43,16 +43,16 @@ git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: "pr-2" tasks: - - include: ../../tasks/webhook-bitbucket/pullrequest-opened.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/pullrequest-opened.yaml -# - include: ../../checks/check-branch-sha.yaml +# - ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml # vars: # expected_head: "{{ pr_commit_hash }}" # expected_branch: "pr-2" # project: "{{ project }}" # url: "{{ check_url }}" -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -68,7 +68,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -89,16 +89,16 @@ git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: "PR Title - UPDATE" tasks: - - include: ../../tasks/webhook-bitbucket/pullrequest-updated.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/pullrequest-updated.yaml -# - include: ../../checks/check-branch-sha.yaml +# - ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml # vars: # expected_head: "{{ pr_2nd_commit_hash }}" # expected_branch: "pr-2" # project: "{{ project }}" # url: "{{ check_url }}" -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -119,7 +119,7 @@ git_pr_number: "1" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-bitbucket/pullrequest-closed.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/pullrequest-closed.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -128,4 +128,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/bitbucket/skip-deployment.yaml b/tests/tests/bitbucket/skip-deployment.yaml index a459db9947..4180ed5a2f 100644 --- a/tests/tests/bitbucket/skip-deployment.yaml +++ b/tests/tests/bitbucket/skip-deployment.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: first_commit_hash: "{{ current_head }}" @@ -17,9 +17,9 @@ git_hash_push: "{{ first_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-bitbucket/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ first_commit_hash }}" expected_branch: "{{ branch }}" @@ -31,7 +31,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - set_fact: second_commit_hash: "{{ current_head }}" @@ -42,7 +42,7 @@ git_hash_push: "{{ second_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-bitbucket/push-skipdeploy.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/push-skipdeploy.yaml - name: "{{ testname }} - wait for 60 seconds to give an eventual running deployment time to run, after that check again if the first commit is still there" hosts: localhost @@ -50,9 +50,9 @@ vars: seconds: "60" tasks: - - include: ../../tasks/pause.yaml + - ansible.builtin.include_tasks: ../../tasks/pause.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ first_commit_hash }}" expected_branch: "{{ branch }}" @@ -65,7 +65,7 @@ vars: git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-bitbucket/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/push-delete.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -74,4 +74,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/bulk-deployment.yaml b/tests/tests/bulk-deployment.yaml index d6bda7d783..0fce85f0da 100644 --- a/tests/tests/bulk-deployment.yaml +++ b/tests/tests/bulk-deployment.yaml @@ -1,22 +1,22 @@ --- -- 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: testname: "BULKDEPLOYMENT {{ cluster_type|upper }}" project: ci-bulk-{{ cluster_type }} git_repo_name: bulk.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: bulk-deployment/bulk-deployment.yaml +- ansible.builtin.import_playbook: bulk-deployment/bulk-deployment.yaml vars: testname: "BULKDEPLOYMENT {{ cluster_type|upper }}" git_repo_name: bulk.git project: ci-bulk-{{ cluster_type }} -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: testname: "BULKDEPLOYMENT {{ cluster_type|upper }}" project: ci-bulk-{{ cluster_type }} diff --git a/tests/tests/bulk-deployment/bulk-deployment.yaml b/tests/tests/bulk-deployment/bulk-deployment.yaml index edaa4e3861..d95b2f1daa 100644 --- a/tests/tests/bulk-deployment/bulk-deployment.yaml +++ b/tests/tests/bulk-deployment/bulk-deployment.yaml @@ -6,8 +6,8 @@ git_files: "bulk/bulk1/" branch: "bulk1" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - init git, add files, commit, git push" hosts: localhost @@ -16,8 +16,8 @@ git_files: "bulk/bulk2/" branch: "bulk2" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - init git, add files, commit, git push" hosts: localhost @@ -26,8 +26,8 @@ git_files: "bulk/bulk3/" branch: "bulk3" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - init git, add files, commit, git push" hosts: localhost @@ -36,8 +36,8 @@ git_files: "bulk/bulk4/" branch: "bulk4" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - init git, add files, commit, git push" hosts: localhost @@ -46,8 +46,8 @@ git_files: "bulk/bulk5/" branch: "bulk5" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - init git, add files, commit, git push" hosts: localhost @@ -56,8 +56,8 @@ git_files: "bulk/bulk6/" branch: "bulk6" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - Add environment bulk1 to project {{ project }}" hosts: localhost @@ -69,7 +69,7 @@ deployBaseRef: "bulk1" environmentType: DEVELOPMENT tasks: - - include: ../../tasks/api/add-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-environment.yaml - name: "{{ testname }} - Add environment bulk2 to project {{ project }}" hosts: localhost @@ -81,7 +81,7 @@ deployBaseRef: "bulk2" environmentType: DEVELOPMENT tasks: - - include: ../../tasks/api/add-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-environment.yaml - name: "{{ testname }} - Add environment bulk3 to project {{ project }}" hosts: localhost @@ -93,7 +93,7 @@ deployBaseRef: "bulk3" environmentType: DEVELOPMENT tasks: - - include: ../../tasks/api/add-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-environment.yaml - name: "{{ testname }} - Add environment bulk4 to project {{ project }}" hosts: localhost @@ -105,7 +105,7 @@ deployBaseRef: "bulk4" environmentType: DEVELOPMENT tasks: - - include: ../../tasks/api/add-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-environment.yaml - name: "{{ testname }} - Add environment bulk5 to project {{ project }}" hosts: localhost @@ -117,7 +117,7 @@ deployBaseRef: "bulk5" environmentType: DEVELOPMENT tasks: - - include: ../../tasks/api/add-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-environment.yaml - name: "{{ testname }} - Add environment bulk6 to project {{ project }}" hosts: localhost @@ -129,7 +129,7 @@ deployBaseRef: "bulk6" environmentType: DEVELOPMENT tasks: - - include: ../../tasks/api/add-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-environment.yaml - name: "{{ testname }} - Trigger bulk deployment" hosts: localhost @@ -144,7 +144,7 @@ - bulk5 - bulk6 tasks: - - include: ../../tasks/api/deploy-bulk-deployment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-bulk-deployment.yaml - name: "{{ testname }} - Get bulk deployment, wait until builds complete" hosts: localhost @@ -153,7 +153,7 @@ name: "{{ item }}" project: "{{ project }}" tasks: - - include: ../../tasks/api/get-bulk-deployment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/get-bulk-deployment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -162,7 +162,7 @@ project: "{{ project }}" branch: "bulk1" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -171,7 +171,7 @@ project: "{{ project }}" branch: "bulk2" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -180,7 +180,7 @@ project: "{{ project }}" branch: "bulk2" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -189,7 +189,7 @@ project: "{{ project }}" branch: "bulk3" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -198,7 +198,7 @@ project: "{{ project }}" branch: "bulk4" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -207,7 +207,7 @@ project: "{{ project }}" branch: "bulk5" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -216,4 +216,4 @@ project: "{{ project }}" branch: "bulk6" tasks: - - include: ../../tasks/api/delete-environment.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml diff --git a/tests/tests/deploytarget.yaml b/tests/tests/deploytarget.yaml index 029340cc8f..be68bad737 100644 --- a/tests/tests/deploytarget.yaml +++ b/tests/tests/deploytarget.yaml @@ -1,17 +1,17 @@ --- -- include: features/api-token.yaml +- ansible.builtin.import_playbook: features/api-token.yaml vars: testname: "API TOKEN" # this test uses the existing nginx repo as it is the simplest example -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-deploytarget-{{ cluster_type }} git_repo_name: nginx.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" # add a deploytarget that only deploys pullrequests, and goes to a non-functional cluster -- include: api/add-deploytarget.yaml +- ansible.builtin.import_playbook: api/add-deploytarget.yaml vars: project: ci-deploytarget-{{ cluster_type }} branches_regex: "false" @@ -19,20 +19,20 @@ openshift_id: 3 # add a deploytarget that only deploys the nginx branch, this goes to the functional cluster -- include: api/add-deploytarget.yaml +- ansible.builtin.import_playbook: api/add-deploytarget.yaml vars: project: ci-deploytarget-{{ cluster_type }} branches_regex: "nginx" pullrequests_regex: "false" openshift_id: 2001 -- include: deploytarget/deploytarget.yaml +- ansible.builtin.import_playbook: deploytarget/deploytarget.yaml vars: testname: "DEPLOYTARGET {{ cluster_type|upper }}" git_repo_name: nginx.git project: ci-deploytarget-{{ cluster_type }} branch: nginx -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-deploytarget-{{ cluster_type }} diff --git a/tests/tests/deploytarget/check-first.yaml b/tests/tests/deploytarget/check-first.yaml index e137f98fbf..9c8f398549 100644 --- a/tests/tests/deploytarget/check-first.yaml +++ b/tests/tests/deploytarget/check-first.yaml @@ -5,7 +5,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if auto generated domain allows secure traffic" hosts: localhost @@ -15,7 +15,7 @@ host: "nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-allow.com' is created and allows insecure traffic" hosts: localhost @@ -25,7 +25,7 @@ host: "insecure-allow.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-allow.com' is created and allows secure traffic" hosts: localhost @@ -35,7 +35,7 @@ host: "insecure-allow.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-redirect.com' is created and redirects to https" hosts: localhost @@ -45,7 +45,7 @@ host: "insecure-redirect.com" expected_redirect_location: "https://insecure-redirect.com/?$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-redirect.com' is created and allows secure traffic" hosts: localhost @@ -55,7 +55,7 @@ host: "insecure-redirect.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-none.com' does not allow http" hosts: localhost @@ -66,7 +66,7 @@ host: "insecure-none.com" expected_returncode: 503 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-none.com' is created and allows secure traffic" hosts: localhost @@ -76,7 +76,7 @@ host: "insecure-none.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'moving-route.com' is created and does not ask for basic auth" hosts: localhost @@ -86,7 +86,7 @@ host: "moving-route.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'hsts-header.com' is created and has HSTS header set" hosts: localhost @@ -98,7 +98,7 @@ expected_header: "strict_transport_security" expected_header_value: "max-age=15768000" tasks: - - include: ../../checks/check-url-header.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header.yaml - name: "{{ testname }} - check if custom domain 'hsts-header-null.com' is created and does not have HSTS header set" hosts: localhost @@ -109,7 +109,7 @@ expected_returncode: 200 expected_header: "strict_transport_security" tasks: - - include: ../../checks/check-url-header-absent.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header-absent.yaml - name: "{{ testname }} - check if {{ project }} is redirecting correctly with no preserve'" hosts: localhost @@ -118,7 +118,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-no-preserve/should/be/missing?arg1" expected_redirect_location: "foo.com$" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - check if {{ project }} is redirecting correctly with preserving'" hosts: localhost @@ -127,7 +127,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-preserve/should/be/existing?arg1" expected_redirect_location: "foo.com/redirect-preserve/should/be/existing\\?arg1$" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - check if {{ project }} is redirecting correctly with preserving only URI'" hosts: localhost @@ -136,7 +136,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-preserve-uri-only/should/be/existing?should-be-gone" expected_redirect_location: "foo.com/redirect-preserve-uri-only/should/be/existing$" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - check if {{ project }} is redirecting correctly with stripping of url'" hosts: localhost @@ -145,7 +145,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-strip-args-handling/should/be/existing?arg1" expected_redirect_location: "foo.com/should/be/existing\\?arg1$" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - check if {{ project }} is requesting a basic auth" hosts: localhost @@ -154,7 +154,7 @@ url: "http://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: 401 tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - check if {{ project }} is deployed and basic auth works" hosts: localhost @@ -165,7 +165,7 @@ user: "username" password: "password" tasks: - - include: ../../checks/check-url-content-basic-auth.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-basic-auth.yaml - name: "{{ testname }} - check if {{ project }} is deployed and basic auth disable via .env variable works" hosts: localhost @@ -174,7 +174,7 @@ url: "http://nginx-basic-auth-disable.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if custom domain nginx-basic-auth.com is working and does basic auth" hosts: localhost @@ -186,4 +186,4 @@ password: "password" host: "nginx-basic-auth.com" tasks: - - include: ../../checks/check-url-content-basic-auth-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-basic-auth-host.yaml diff --git a/tests/tests/deploytarget/check-second.yaml b/tests/tests/deploytarget/check-second.yaml index 06453139f5..db9e02281b 100644 --- a/tests/tests/deploytarget/check-second.yaml +++ b/tests/tests/deploytarget/check-second.yaml @@ -5,7 +5,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_redirect_location: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - SECOND TEST: check if auto generated domain redirects insecure traffic" hosts: localhost @@ -15,7 +15,7 @@ host: "nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_redirect_location: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'insecure-allow.com' now does not allow insecure anymore" hosts: localhost @@ -26,7 +26,7 @@ host: "insecure-allow.com" expected_returncode: 503 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'insecure-redirect.com' is created and still redirects to https" hosts: localhost @@ -36,7 +36,7 @@ host: "insecure-redirect.com" expected_redirect_location: "https://insecure-redirect.com/?$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'insecure-none.com' now allows http" hosts: localhost @@ -46,7 +46,7 @@ host: "insecure-none.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'moving-route.com' is moved and now requests basic auth" hosts: localhost @@ -56,7 +56,7 @@ host: "moving-route.com" expected_returncode: 401 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'hsts-header-null.com' now has HSTS header set" hosts: localhost @@ -68,7 +68,7 @@ expected_header: "strict_transport_security" expected_header_value: "max-age=15768000" tasks: - - include: ../../checks/check-url-header.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'hsts-header.com' is created and does not have HSTS header set" hosts: localhost @@ -79,4 +79,4 @@ expected_returncode: 200 expected_header: "strict_transport_security" tasks: - - include: ../../checks/check-url-header-absent.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header-absent.yaml diff --git a/tests/tests/deploytarget/deploytarget.yaml b/tests/tests/deploytarget/deploytarget.yaml index 6217c6f4ce..082ca30a53 100644 --- a/tests/tests/deploytarget/deploytarget.yaml +++ b/tests/tests/deploytarget/deploytarget.yaml @@ -5,8 +5,8 @@ vars: git_files: "nginx/first/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-first.yaml +- ansible.builtin.import_playbook: check-first.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -30,7 +30,7 @@ vars: git_files: "nginx/second/" tasks: - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the second commit" hosts: localhost @@ -40,9 +40,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-second.yaml +- ansible.builtin.import_playbook: check-second.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -55,7 +55,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -64,4 +64,4 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/drupal/check-deployed.yaml b/tests/tests/drupal/check-deployed.yaml index 7a6cfad5b3..5d560bc876 100644 --- a/tests/tests/drupal/check-deployed.yaml +++ b/tests/tests/drupal/check-deployed.yaml @@ -5,7 +5,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "LAGOON_GIT_SHA={{ expected_head }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for branch name, nginx route" hosts: localhost @@ -14,7 +14,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "LAGOON_GIT_BRANCH={{ expected_branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, nginx route" hosts: localhost @@ -23,7 +23,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "LAGOON_GIT_SHA={{ expected_head }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for branch name, nginx route" hosts: localhost @@ -32,4 +32,4 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "LAGOON_GIT_BRANCH={{ expected_branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml diff --git a/tests/tests/drupal/drush-la.yaml b/tests/tests/drupal/drush-la.yaml index 4bc44773d5..0d8a22bebe 100644 --- a/tests/tests/drupal/drush-la.yaml +++ b/tests/tests/drupal/drush-la.yaml @@ -5,8 +5,8 @@ git_files: "drupal{{ drupal_version }}-{{ db }}/" branch: "drush-first" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: current_head_first: "{{ current_head }}" @@ -18,7 +18,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-drush-first" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} SECOND - init git, add files, commit, git push" hosts: localhost @@ -27,8 +27,8 @@ git_files: "drupal{{ drupal_version }}-{{ db }}/" branch: "drush-second" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: current_head_second: "{{ current_head }}" @@ -40,16 +40,16 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-drush-second" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-deployed.yaml +- ansible.builtin.import_playbook: check-deployed.yaml vars: expected_head: "{{ current_head_first }}" expected_branch: "drush-first" branch: "drush-first" project: "{{ project }}" -- include: check-deployed.yaml +- ansible.builtin.import_playbook: check-deployed.yaml vars: expected_head: "{{ current_head_second }}" expected_branch: "drush-second" @@ -62,7 +62,7 @@ # vars: # seconds: "900" # tasks: -# - include: ../../tasks/pause.yaml +# - ansible.builtin.include_tasks: ../../tasks/pause.yaml - name: "{{ testname }} - check if we can connect via oc project user and no service" hosts: localhost @@ -72,7 +72,7 @@ command: env expected_content: LAGOON=cli-drupal tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if we can connect via oc project user defining service and container" hosts: localhost @@ -82,7 +82,7 @@ command: service=nginx container=php env expected_content: LAGOON=php tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if drush site alias shows up @drush-second" hosts: localhost @@ -92,7 +92,7 @@ command: drush la expected_content: "@lagoon.{{ project }}-drush-second" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - set remote drupal site 'drush-second' name with random number" hosts: localhost @@ -104,7 +104,7 @@ tasks: - set_fact: random_number: "{{ 99999999 | random }}" - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if site name set on remote drupal 'drush-second' has worked" hosts: localhost @@ -114,7 +114,7 @@ command: drush @lagoon.{{ project }}-drush-second -y cget system.site name expected_content: "CHANGED-{{ random_number }}" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, nginx route" hosts: localhost @@ -123,7 +123,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ route_suffix }}" expected_content: "CHANGED-{{ random_number }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - drush sql-sync from remote drupal site 'drush-second' to local" hosts: localhost @@ -133,7 +133,7 @@ command: drush -y sql-sync @lagoon.{{ project }}-drush-second @self expected_content: "" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if random number now appears on own drupal" hosts: localhost @@ -143,7 +143,7 @@ command: drush -y cget system.site name expected_content: "CHANGED-{{ random_number }}" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, nginx route" hosts: localhost @@ -152,7 +152,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ route_suffix }}" expected_content: "CHANGED-{{ random_number }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -161,7 +161,7 @@ project: "{{ project }}" branch: "drush-first" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -170,7 +170,7 @@ project: "{{ project }}" branch: "drush-second" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -179,7 +179,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -188,7 +188,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} third - init git, add files, commit, git push" hosts: localhost @@ -197,8 +197,8 @@ git_files: "drupal{{ drupal_version }}-{{ db }}/" branch: "foo/bar" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: current_head_third: "{{ current_head }}" @@ -210,9 +210,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-foo-bar" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-deployed.yaml +- ansible.builtin.import_playbook: check-deployed.yaml vars: expected_head: "{{ current_head_third }}" expected_branch: "foo/bar" @@ -227,7 +227,7 @@ command: drush @lagoon.{{ project }}-foo-bar ssh echo zzyzx expected_content: "zzyzx" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -236,7 +236,7 @@ project: "{{ project }}" branch: "foo/bar" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -245,4 +245,4 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.foo-bar.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/drupal/drush-sa.yaml b/tests/tests/drupal/drush-sa.yaml index af5ff834ba..8fa68c74a8 100644 --- a/tests/tests/drupal/drush-sa.yaml +++ b/tests/tests/drupal/drush-sa.yaml @@ -5,8 +5,8 @@ git_files: "drupal{{ drupal_version }}-{{ db }}/" branch: "drush-first" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: current_head_first: "{{ current_head }}" @@ -18,7 +18,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-drush-first" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} SECOND - init git, add files, commit, git push" hosts: localhost @@ -27,8 +27,8 @@ git_files: "drupal{{ drupal_version }}-{{ db }}/" branch: "drush-second" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: current_head_second: "{{ current_head }}" @@ -40,16 +40,16 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-drush-second" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-deployed.yaml +- ansible.builtin.import_playbook: check-deployed.yaml vars: expected_head: "{{ current_head_first }}" expected_branch: "drush-first" branch: "drush-first" project: "{{ project }}" -- include: check-deployed.yaml +- ansible.builtin.import_playbook: check-deployed.yaml vars: expected_head: "{{ current_head_second }}" expected_branch: "drush-second" @@ -64,7 +64,7 @@ command: env expected_content: LAGOON=cli-drupal tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if we can connect via oc project user defining service and container" hosts: localhost @@ -74,7 +74,7 @@ command: service=nginx container=php env expected_content: LAGOON=php tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if drush site alias shows up @drush-second" hosts: localhost @@ -84,7 +84,7 @@ command: drush sa expected_content: "@drush-second" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - set remote drupal site 'drush-second' name with random number" hosts: localhost @@ -96,7 +96,7 @@ tasks: - set_fact: random_number: "{{ 99999999 | random }}" - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if site name set on remote drupal 'drush-second' has worked" hosts: localhost @@ -106,7 +106,7 @@ command: drush @drush-second -y cget system.site name expected_content: "CHANGED-{{ random_number }}" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, nginx route" hosts: localhost @@ -115,7 +115,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ route_suffix }}" expected_content: "CHANGED-{{ random_number }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - drush sql-sync from remote drupal site 'drush-second' to local" hosts: localhost @@ -125,7 +125,7 @@ command: drush -y sql-sync @drush-second @self expected_content: "" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if random number now appears on own drupal" hosts: localhost @@ -135,7 +135,7 @@ command: drush -y cget system.site name expected_content: "CHANGED-{{ random_number }}" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, nginx route" hosts: localhost @@ -144,7 +144,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ route_suffix }}" expected_content: "CHANGED-{{ random_number }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -153,7 +153,7 @@ project: "{{ project }}" branch: "drush-first" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -162,7 +162,7 @@ project: "{{ project }}" branch: "drush-second" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -171,7 +171,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-first.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -180,7 +180,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.drush-second.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} third - init git, add files, commit, git push" hosts: localhost @@ -189,8 +189,8 @@ git_files: "drupal{{ drupal_version }}-{{ db }}/" branch: "foo/bar" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: current_head_third: "{{ current_head }}" @@ -202,9 +202,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-foo-bar" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-deployed.yaml +- ansible.builtin.import_playbook: check-deployed.yaml vars: expected_head: "{{ current_head_third }}" expected_branch: "foo/bar" @@ -219,7 +219,7 @@ command: drush @foo-bar ssh echo zzyzx expected_content: "zzyzx" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -228,7 +228,7 @@ project: "{{ project }}" branch: "foo/bar" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -237,4 +237,4 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.foo-bar.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/drush.yaml b/tests/tests/drush.yaml index 76e79c700d..104aeda177 100644 --- a/tests/tests/drush.yaml +++ b/tests/tests/drush.yaml @@ -1,15 +1,15 @@ --- -- 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-drush-la-{{ cluster_type }} git_repo_name: drush.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: drupal/drush-la.yaml +- ansible.builtin.import_playbook: drupal/drush-la.yaml vars: testname: "DRUSH integration {{ cluster_type|upper }}" drupal_version: 9 @@ -18,17 +18,17 @@ git_repo_name: drush.git project: ci-drush-la-{{ cluster_type }} -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-drush-la-{{ cluster_type }} -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-drush-sa-{{ cluster_type }} git_repo_name: drush-sa.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: drupal/drush-sa.yaml +- ansible.builtin.import_playbook: drupal/drush-sa.yaml vars: testname: "DRUSH legacy {{ cluster_type|upper }}" drupal_version: 8 @@ -37,6 +37,6 @@ git_repo_name: drush-sa.git project: ci-drush-sa-{{ cluster_type }} -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-drush-sa-{{ cluster_type }} diff --git a/tests/tests/features-kubernetes-2.yaml b/tests/tests/features-kubernetes-2.yaml index 70261ba908..e61eaf5a5c 100644 --- a/tests/tests/features-kubernetes-2.yaml +++ b/tests/tests/features-kubernetes-2.yaml @@ -1,21 +1,21 @@ --- -- 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-multiproject1-{{ cluster_type }} git_repo_name: multiproject.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-multiproject2-{{ cluster_type }} git_repo_name: multiproject.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: features/multiproject.yaml +- ansible.builtin.import_playbook: features/multiproject.yaml vars: testname: "MULTIPROJECT {{ cluster_type|upper }} - two projects with same git url" git_repo_name: multiproject.git @@ -27,22 +27,22 @@ custom_domain1: "multiproject1.com" custom_domain2: "multiproject2.com" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-multiproject1-{{ cluster_type }} -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-multiproject2-{{ cluster_type }} -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-features-subfolder-{{ cluster_type }} git_repo_name: features-subfolder.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" sub_folder: subfolder1/subfolder2 -- include: features/subfolder.yaml +- ansible.builtin.import_playbook: features/subfolder.yaml vars: testname: "SUBFOLDER {{ cluster_type|upper }}" git_repo_name: features-subfolder.git @@ -50,17 +50,17 @@ branch: subfolder check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-features-subfolder-{{ cluster_type }} -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-features-cronjobs-{{ cluster_type }} git_repo_name: features-cronjobs.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: features/cronjobs.yaml +- ansible.builtin.import_playbook: features/cronjobs.yaml vars: testname: "CRONJOBS {{ cluster_type|upper }}" git_repo_name: features-cronjobs.git @@ -68,6 +68,6 @@ branch: branch/cronjob check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-features-cronjobs-{{ cluster_type }} diff --git a/tests/tests/features-kubernetes.yaml b/tests/tests/features-kubernetes.yaml index a4e43fcb14..ed20d6b220 100644 --- a/tests/tests/features-kubernetes.yaml +++ b/tests/tests/features-kubernetes.yaml @@ -1,15 +1,15 @@ --- -- 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-features-{{ cluster_type }} git_repo_name: features.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -# - include: features/fastly-annotations.yaml +# - ansible.builtin.import_playbook: features/fastly-annotations.yaml # vars: # testname: "FASTLY ANNOTATIONS {{ cluster_type|upper }}" # git_repo_name: features.git @@ -17,7 +17,7 @@ # branch: fastly-annotations # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: features/lagoon-type-override.yaml +# - ansible.builtin.import_playbook: features/lagoon-type-override.yaml # vars: # testname: "LAGOON TYPE OVERRIDE {{ cluster_type|upper }}" # git_repo_name: features.git @@ -25,7 +25,7 @@ # branch: lagoon-type-override # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: features/ingress-annotations.yaml +- ansible.builtin.import_playbook: features/ingress-annotations.yaml vars: testname: "INGRESS ANNOTATIONS {{ cluster_type|upper }}" git_repo_name: features.git @@ -33,7 +33,7 @@ branch: ingress-annotations check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: features/short-router-url.yaml +- ansible.builtin.import_playbook: features/short-router-url.yaml vars: testname: "SHORT ROUTER URL {{ cluster_type|upper }}" git_repo_name: features.git @@ -44,14 +44,14 @@ lagoon_environment: short-router-url-from-a-very-l-ebe8 check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: features/namespace-labels.yaml +# - ansible.builtin.import_playbook: features/namespace-labels.yaml # vars: # testname: "NAMESPACE LABELS {{ cluster_type|upper }}" # git_repo_name: features.git # project: ci-features-{{ cluster_type }} # branch: namespace-labels -- include: features/remote-shell.yaml +- ansible.builtin.import_playbook: features/remote-shell.yaml vars: testname: "REMOTE SHELL {{ cluster_type|upper }}" node_version: 16 @@ -60,7 +60,7 @@ branch: remoteshell check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: features/promote.yaml +# - ansible.builtin.import_playbook: features/promote.yaml # vars: # testname: "PROMOTE {{ cluster_type|upper }}" # git_repo_name: features.git @@ -70,7 +70,7 @@ # check_url_source: "https://node.{{ project | regex_replace('_', '-') }}.{{ source_environment | regex_replace('/', '-') }}.{{ route_suffix_https }}" # check_url_promote: "https://node.{{ project | regex_replace('_', '-') }}.{{ promote_environment | regex_replace('/', '-') }}.{{ route_suffix_https }}" -# - include: features/openshift-limit.yaml +# - ansible.builtin.import_playbook: features/openshift-limit.yaml # vars: # testname: "openshift-character-limit {{ cluster_type|upper }}" # node_version: 16 @@ -80,7 +80,7 @@ # # not going to try hashing something in yaml. # check_url: "http://node.{{ project | regex_replace('_', '-') }}.very-long-branch-name-what-would-otherwise-aae9.{{ route_suffix }}" -- include: features/environment-type.yaml +- ansible.builtin.import_playbook: features/environment-type.yaml vars: testname: "ENVIRONMENT TYPE DEVELOPMENT {{ cluster_type|upper }}" git_repo_name: features.git @@ -89,7 +89,7 @@ environment_type: development check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: features/environment-templates.yaml +# - ansible.builtin.import_playbook: features/environment-templates.yaml # vars: # testname: "CUSTOM DEPLOYMENT TEMPLATES docker-compose {{ cluster_type|upper }}" # git_repo_name: features.git @@ -98,7 +98,7 @@ # expected_template_filename: .lagoon.node.yml # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -# - include: features/environment-templates.yaml +# - ansible.builtin.import_playbook: features/environment-templates.yaml # vars: # testname: "ENVIRIONMENT SPECIFIC CUSTOM DEPLOYMENT TEMPLATES {{ cluster_type|upper }} .lagoon.yml" # git_repo_name: features.git @@ -107,7 +107,7 @@ # expected_template_filename: .lagoon.node-env-specific.yml # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: features/environment-type.yaml +- ansible.builtin.import_playbook: features/environment-type.yaml vars: testname: "ENVIRONMENT TYPE PRODUCTION {{ cluster_type|upper }}" git_repo_name: features.git @@ -116,7 +116,7 @@ environment_type: production check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: features/route-env-variables.yaml +- ansible.builtin.import_playbook: features/route-env-variables.yaml vars: testname: "ROUTE ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features.git @@ -124,7 +124,7 @@ branch: branch/routes check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: features/autogenerated-routes-disabled.yaml +- ansible.builtin.import_playbook: features/autogenerated-routes-disabled.yaml vars: testname: "AUTOGENERATED ROUTES DISABLED {{ cluster_type|upper }}" git_repo_name: features.git @@ -133,13 +133,13 @@ check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" # # @TODO: Enable again, see https://github.com/uselagoon/lagoon/issues/1099 -# # - include: features/limits.yaml +# # - ansible.builtin.import_playbook: features/limits.yaml # # vars: # # testname: "limits" # # git_repo_name: node.git # # project: ci-env-limit # # check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-features-{{ cluster_type }} diff --git a/tests/tests/features-variables.yaml b/tests/tests/features-variables.yaml index 37ef6a8eab..dc518d5ce1 100644 --- a/tests/tests/features-variables.yaml +++ b/tests/tests/features-variables.yaml @@ -1,49 +1,49 @@ --- -- 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-features-api-variables-{{ cluster_type }} git_repo_name: features-variables.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: api/add-environment.yaml +- ansible.builtin.import_playbook: api/add-environment.yaml vars: name: lagoon-api-variables project: ci-features-api-variables-{{ cluster_type }} environmentType: PRODUCTION -- include: api/add-project-variable.yaml +- ansible.builtin.import_playbook: api/add-project-variable.yaml vars: project: ci-features-api-variables-{{ cluster_type }} envName: "LAGOON_API_VARIABLE_PROJECT" envValue: "4A65DC68F2" envScope: "GLOBAL" -- include: api/add-project-variable.yaml +- ansible.builtin.import_playbook: api/add-project-variable.yaml vars: project: ci-features-api-variables-{{ cluster_type }} envName: "LAGOON_API_VARIABLE_OVERRIDE" envValue: "74B3E42B54" envScope: "GLOBAL" -- include: api/add-project-variable.yaml +- ansible.builtin.import_playbook: api/add-project-variable.yaml vars: project: ci-features-api-variables-{{ cluster_type }} envName: "LAGOON_API_VARIABLE_BUILD" envValue: "AEF177FCF4" envScope: "BUILD" -- include: api/add-project-variable.yaml +- ansible.builtin.import_playbook: api/add-project-variable.yaml vars: project: ci-features-api-variables-{{ cluster_type }} envName: "LAGOON_API_VARIABLE_RUNTIME" envValue: "90AEC657F8" envScope: "RUNTIME" -- include: features/lagoon-api-variables.yaml +- ansible.builtin.import_playbook: features/lagoon-api-variables.yaml vars: testname: "LAGOON API VARIABLES {{ cluster_type|upper }}" git_repo_name: features-variables.git @@ -51,21 +51,21 @@ branch: lagoon-api-variables check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-features-api-variables-{{ cluster_type }} -- 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-features-dotenv-variables-{{ cluster_type }} git_repo_name: features-variables.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: features/dot-env.yaml +- ansible.builtin.import_playbook: features/dot-env.yaml vars: testname: "DOT-ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features-variables.git @@ -74,7 +74,7 @@ expected_dot_env: slash/branch1 check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: features/dot-env.yaml +- ansible.builtin.import_playbook: features/dot-env.yaml vars: testname: "DOT-ENV VARIABLES {{ cluster_type|upper }}" git_repo_name: features-variables.git @@ -83,6 +83,6 @@ expected_dot_env: branch1 check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-features-dotenv-variables-{{ cluster_type }} diff --git a/tests/tests/features/api-token-legacy.yaml b/tests/tests/features/api-token-legacy.yaml index a93872a875..33be2f8cb3 100644 --- a/tests/tests/features/api-token-legacy.yaml +++ b/tests/tests/features/api-token-legacy.yaml @@ -5,7 +5,7 @@ ssh_token_host: "{{ ssh_host }}" ssh_token_port: "{{ ssh_auth_port }}" tasks: - - include: ../../tasks/ssh/get-keycloak-grant-via-ssh.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/get-keycloak-grant-via-ssh.yaml - name: "SSH AUTH LEGACY - Check if token is allowed for API request" hosts: localhost @@ -15,4 +15,4 @@ bearer_token: "{{ token }}" expected_content: '{"status":"success","data":{}}' tasks: - - include: ../../checks/check-api-request.yaml + - ansible.builtin.include_tasks: ../../checks/check-api-request.yaml diff --git a/tests/tests/features/api-token.yaml b/tests/tests/features/api-token.yaml index 8e0945a8d1..d1664bb7e2 100644 --- a/tests/tests/features/api-token.yaml +++ b/tests/tests/features/api-token.yaml @@ -2,7 +2,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/ssh/get-keycloak-grant-via-ssh.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/get-keycloak-grant-via-ssh.yaml - name: "SSH AUTH - Check if token is allowed for API request" hosts: localhost @@ -12,4 +12,4 @@ bearer_token: "{{ token }}" expected_content: '{"status":"success","data":{}}' tasks: - - include: ../../checks/check-api-request.yaml + - ansible.builtin.include_tasks: ../../checks/check-api-request.yaml diff --git a/tests/tests/features/autogenerated-routes-disabled.yaml b/tests/tests/features/autogenerated-routes-disabled.yaml index f1e01f8ca6..c85488e973 100644 --- a/tests/tests/features/autogenerated-routes-disabled.yaml +++ b/tests/tests/features/autogenerated-routes-disabled.yaml @@ -5,8 +5,8 @@ vars: git_files: "features-autogenerated-routes-disabled/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with accessing the custom domain and searching for the environment variable LAGOON_ROUTES" hosts: localhost @@ -26,7 +26,7 @@ host: "customdomain.com" expected_content: "LAGOON_ROUTES=https://customdomain.com" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check that usual auto generated domain does not work" hosts: localhost @@ -35,7 +35,7 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -44,7 +44,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -54,4 +54,4 @@ host: "customdomain.com" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml diff --git a/tests/tests/features/cronjobs.yaml b/tests/tests/features/cronjobs.yaml index da52c1eb4a..47576a410c 100644 --- a/tests/tests/features/cronjobs.yaml +++ b/tests/tests/features/cronjobs.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'CRONJOB_PWD_/app' which is added via a cronjob" hosts: localhost @@ -25,7 +25,7 @@ url: "{{ check_url }}" expected_content: "CRONJOB_PWD_/app" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'CRONJOB_SINGLE' which is added via a cronjob" hosts: localhost @@ -34,7 +34,7 @@ url: "{{ check_url }}" expected_content: "CRONJOB_SINGLE" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'CRONJOB_MULTIPLE' which is added via a cronjob with multiple commands" hosts: localhost @@ -43,7 +43,7 @@ url: "{{ check_url }}" expected_content: "CRONJOB_MULTIPLE" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'CRONJOB_STAR1' which is added via a cronjob" hosts: localhost @@ -52,7 +52,7 @@ url: "{{ check_url }}" expected_content: "CRONJOB_STAR1" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'CRONJOB_H1' which is added via a cronjob" hosts: localhost @@ -61,7 +61,7 @@ url: "{{ check_url }}" expected_content: "CRONJOB_H1" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'CRONJOB_NATIVE' which is added via a cronjob" hosts: localhost @@ -70,7 +70,7 @@ url: "{{ check_url }}" expected_content: "CRONJOB_NATIVE" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml # This is where we need to modify the lagoon versions and do another deploy - name: "{{ testname }} - change .lagoon.yml to remove cron, git push" @@ -80,7 +80,7 @@ git_files: "features/" overwrite_lagoon_yml: ".lagoon-no-cronjobs.yml" tasks: - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the newest changes for cron removal" hosts: localhost @@ -90,7 +90,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml # Pause while the cronjob project redeploys - name: "{{ testname }} - wait for 60 seconds to give an eventual running deployment time to run" @@ -99,7 +99,7 @@ vars: seconds: "60" tasks: - - include: ../../tasks/pause.yaml + - ansible.builtin.include_tasks: ../../tasks/pause.yaml # Run cron removal test - name: "{{ testname }} - check if {{ project }} had its native cronjob removed correctly" @@ -108,7 +108,7 @@ vars: url: "{{ check_url }}/ts" tasks: - - include: ../../checks/check-url-ts.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-ts.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -117,7 +117,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -126,4 +126,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/disable-inject-git-sha.yaml b/tests/tests/features/disable-inject-git-sha.yaml index 4fed4bffd8..f3dbd923ae 100644 --- a/tests/tests/features/disable-inject-git-sha.yaml +++ b/tests/tests/features/disable-inject-git-sha.yaml @@ -5,8 +5,8 @@ vars: git_files: "features-disable-inject-git-sha/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch deploy for just git branch on {{ project }}" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check that the git sha is 0's" hosts: localhost @@ -25,7 +25,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_GIT_SHA=0000000000000000000000000000000000000000" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -34,7 +34,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -43,4 +43,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml diff --git a/tests/tests/features/dot-env.yaml b/tests/tests/features/dot-env.yaml index f9388deb7b..cb0169c524 100644 --- a/tests/tests/features/dot-env.yaml +++ b/tests/tests/features/dot-env.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the env variable set by .env file" hosts: localhost @@ -25,7 +25,7 @@ url: "{{ check_url }}" expected_content: "VARIABLE_SET_BY_DOTENV=true" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the env variable set by .env.defaults file" hosts: localhost @@ -34,7 +34,7 @@ url: "{{ check_url }}" expected_content: "VARIABLE_SET_BY_DOTENV_DEFAULTS=true" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the env variable set by .env.defaults file" hosts: localhost @@ -43,7 +43,7 @@ url: "{{ check_url }}" expected_content: "VARIABLE_SET_BY_DOTENV_BRANCH={{ expected_dot_env }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -52,7 +52,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -61,4 +61,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/environment-templates.yaml b/tests/tests/features/environment-templates.yaml index 0058373c3f..322e4de7b0 100644 --- a/tests/tests/features/environment-templates.yaml +++ b/tests/tests/features/environment-templates.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the env variable set by .env file" hosts: localhost @@ -25,7 +25,7 @@ url: "{{ check_url }}" expected_content: "TEMPLATE_FILENAME={{ expected_template_filename }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -34,7 +34,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -43,4 +43,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/environment-type.yaml b/tests/tests/features/environment-type.yaml index 812b2ca14f..98a3fc784b 100644 --- a/tests/tests/features/environment-type.yaml +++ b/tests/tests/features/environment-type.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the correct environment type" hosts: localhost @@ -25,7 +25,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_ENVIRONMENT_TYPE={{ environment_type }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -34,7 +34,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -43,4 +43,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/fastly-annotations.yaml b/tests/tests/features/fastly-annotations.yaml index fe51013365..d9d4e5d0f3 100644 --- a/tests/tests/features/fastly-annotations.yaml +++ b/tests/tests/features/fastly-annotations.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml # delete the envvar if it exists already - name: "{{ testname }} - api delete LAGOON_FASTLY_SERVICE_ID envVariable on {{ project }}" @@ -16,7 +16,7 @@ envName: "LAGOON_FASTLY_SERVICE_ID" project: "{{ project }}" tasks: - - include: ../../tasks/api/delete-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-project-variable.yaml # delete the envvar if it exists already - name: "{{ testname }} - api delete LAGOON_FASTLY_SERVICE_IDS envVariable on {{ project }}" @@ -26,7 +26,7 @@ envName: "LAGOON_FASTLY_SERVICE_IDS" project: "{{ project }}" tasks: - - include: ../../tasks/api/delete-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-project-variable.yaml # delete the envvar if it exists already - name: "{{ testname }} - api delete LAGOON_FASTLY_API_SECRETS envVariable on {{ project }}" @@ -36,7 +36,7 @@ envName: "LAGOON_FASTLY_API_SECRETS" project: "{{ project }}" tasks: - - include: ../../tasks/api/delete-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-project-variable.yaml # # add the `LAGOON_FASTLY_NOCACHE_SERVICE_ID` environment variable # - name: "{{ testname }} - api add envVariable on {{ project }}" @@ -48,7 +48,7 @@ # envScope: "BUILD" # project: "{{ project }}" # tasks: -# - include: ../../tasks/api/add-project-variable.yaml +# - ansible.builtin.include_tasks: ../../tasks/api/add-project-variable.yaml # - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" # hosts: localhost @@ -58,7 +58,7 @@ # project: "{{ project }}" # namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" # tasks: -# - include: ../../tasks/api/deploy-no-sha.yaml +# - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml # - name: > # {{ testname }} - check that the ingress has the correct fastly annotations @@ -71,7 +71,7 @@ # - "fastly.amazee.io/service-id=lagoon" # ingress: annotations.com # tasks: -# - include: ../../checks/check-ingress-annotations.yaml +# - ansible.builtin.include_tasks: ../../checks/check-ingress-annotations.yaml # add the `LAGOON_FASTLY_SERVICE_ID` environment variable - name: "{{ testname }} - api add LAGOON_FASTLY_SERVICE_ID envVariable on {{ project }}" @@ -83,7 +83,7 @@ envScope: "BUILD" project: "{{ project }}" tasks: - - include: ../../tasks/api/add-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-project-variable.yaml - name: "{{ testname }} - api deployEnvironmentBranch {{ branch }} on {{ project }}" hosts: localhost @@ -93,7 +93,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: > {{ testname }} - check that the ingress has the correct fastly annotations @@ -106,7 +106,7 @@ - "fastly.amazee.io/service-id=newlagoon" ingress: annotations.com tasks: - - include: ../../checks/check-ingress-annotations.yaml + - ansible.builtin.include_tasks: ../../checks/check-ingress-annotations.yaml # add the `LAGOON_FASTLY_API_SECRETS` environment variable - name: "{{ testname }} - api add LAGOON_FASTLY_API_SECRETS envVariable on {{ project }}" @@ -118,7 +118,7 @@ envScope: "BUILD" project: "{{ project }}" tasks: - - include: ../../tasks/api/add-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-project-variable.yaml # add the `LAGOON_FASTLY_API_SECRETS` environment variable - name: "{{ testname }} - api add LAGOON_FASTLY_SERVICE_IDS envVariable on {{ project }}" @@ -130,7 +130,7 @@ envScope: "BUILD" project: "{{ project }}" tasks: - - include: ../../tasks/api/add-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-project-variable.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -140,7 +140,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: > {{ testname }} - check that the ingress has the correct fastly annotations for a service override with custom secret @@ -154,7 +154,7 @@ - "fastly.amazee.io/api-secret-name=fastly-api-annotationscom" ingress: annotations.com tasks: - - include: ../../checks/check-ingress-annotations.yaml + - ansible.builtin.include_tasks: ../../checks/check-ingress-annotations.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -163,7 +163,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -172,4 +172,4 @@ url: "{{ check_url }}" expected_returncode: "{{ lookup('env','DELETED_STATUS_CODE') }}" tasks: - - include: ../../checks/check-url-returncode.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/ingress-annotations.yaml b/tests/tests/features/ingress-annotations.yaml index 2612e6b769..2b1f90a641 100644 --- a/tests/tests/features/ingress-annotations.yaml +++ b/tests/tests/features/ingress-annotations.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: > {{ testname }} - check that the ingress has the correct annotations @@ -29,7 +29,7 @@ - "ladybird=dog" ingress: annotations.com tasks: - - include: ../../checks/check-ingress-annotations.yaml + - ansible.builtin.include_tasks: ../../checks/check-ingress-annotations.yaml - name: "{{ testname }} - check if custom domain 'redirect-to-example.com' is created and redirects to https://example.com" hosts: localhost @@ -39,7 +39,7 @@ host: "redirect-to-example.com" expected_redirect_location: "https://example.com/$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - check if custom domain 'redirect-to-example.com' is created and request to /asdf redirects to https://example.com/asdf" hosts: localhost @@ -49,7 +49,7 @@ host: "redirect-to-example.com" expected_redirect_location: "https://example.com/asdf$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - check if custom domain 'redirect-to-www.com' is created and redirects to https://www.redirect-to-www.com" hosts: localhost @@ -59,7 +59,7 @@ host: "redirect-to-www.com" expected_redirect_location: "https://www.redirect-to-www.com/$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - check if custom domain 'www.redirect-from-www.com' is created and redirects to https://redirect-from-www.com" hosts: localhost @@ -69,7 +69,7 @@ host: "www.redirect-from-www.com" expected_redirect_location: "https://redirect-from-www.com/$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -78,7 +78,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -87,4 +87,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/lagoon-api-variables.yaml b/tests/tests/features/lagoon-api-variables.yaml index de47ba526b..7112853492 100644 --- a/tests/tests/features/lagoon-api-variables.yaml +++ b/tests/tests/features/lagoon-api-variables.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is built with project environment variables" hosts: localhost @@ -25,7 +25,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_API_VARIABLE_PROJECT_BUILDTIME=4A65DC68F2" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml # TEMP disable during testing # - name: "{{ testname }} - check if {{ project }} is built with environment variables" @@ -35,7 +35,7 @@ # url: "{{ check_url }}" # expected_content: "LAGOON_API_VARIABLE_ENVIRONMENT_BUILDTIME=EA2AFAE09B" # tasks: -# - include: ../../checks/check-url-content.yaml +# - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml # TEMP disable during testing # - name: "{{ testname }} - check if {{ project }} is built with environment overriding project environment variables" @@ -45,7 +45,7 @@ # url: "{{ check_url }}" # expected_content: "LAGOON_API_VARIABLE_OVERRIDE_BUILDTIME=D0CE76D4C9" # tasks: -# - include: ../../checks/check-url-content.yaml +# - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with project environment variables" hosts: localhost @@ -54,7 +54,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_API_VARIABLE_PROJECT=4A65DC68F2" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml # TEMP disable during testing # - name: "{{ testname }} - check if {{ project }} is deployed with environment variables" @@ -64,7 +64,7 @@ # url: "{{ check_url }}" # expected_content: "LAGOON_API_VARIABLE_ENVIRONMENT=EA2AFAE09B" # tasks: -# - include: ../../checks/check-url-content.yaml +# - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml # TEMP disable during testing # - name: "{{ testname }} - check if {{ project }} is deployed with environment overriding project environment variables" @@ -74,7 +74,7 @@ # url: "{{ check_url }}" # expected_content: "LAGOON_API_VARIABLE_OVERRIDE=D0CE76D4C9" # tasks: -# - include: ../../checks/check-url-content.yaml +# - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is built with BUILD scope environment variables" hosts: localhost @@ -83,7 +83,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_API_VARIABLE_BUILD_BUILDTIME=AEF177FCF4" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with RUNTIME scope environment variables" hosts: localhost @@ -92,7 +92,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_API_VARIABLE_RUNTIME=90AEC657F8" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml # TEMP disable during testing # - name: "{{ testname }} - check if {{ project }} is built with project environment variables" @@ -102,7 +102,7 @@ # url: "{{ check_url }}" # expected_content: "LAGOON_API_VARIABLE_MULTILINE_SPACED_BUILDTIME=-----BEGIN PUBLIC KEY-----\\\\nB10B03D8DB7F\\\\n-----END PUBLIC KEY-----" # tasks: -# - include: ../../checks/check-url-content.yaml +# - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml # TEMP disable during testing # - name: "{{ testname }} - check if {{ project }} is deployed with project environment variables" @@ -112,7 +112,7 @@ # url: "{{ check_url }}" # expected_content: "LAGOON_API_VARIABLE_MULTILINE_SPACED=-----BEGIN PUBLIC KEY-----\\\\nB10B03D8DB7F\\\\n-----END PUBLIC KEY-----" # tasks: -# - include: ../../checks/check-url-content.yaml +# - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is built without RUNTIME scope environment variables" hosts: localhost @@ -121,7 +121,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_API_VARIABLE_RUNTIME_BUILDTIME=90AEC657F8" tasks: - - include: ../../checks/check-url-content-absent.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-absent.yaml - name: "{{ testname }} - check if {{ project }} is deployed without BUILD scope environment variables" hosts: localhost @@ -130,7 +130,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_API_VARIABLE_BUILD=AEF177FCF4" tasks: - - include: ../../checks/check-url-content-absent.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-absent.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -139,7 +139,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -148,4 +148,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/lagoon-type-override.yaml b/tests/tests/features/lagoon-type-override.yaml index b0bfd8946a..091142ca0d 100644 --- a/tests/tests/features/lagoon-type-override.yaml +++ b/tests/tests/features/lagoon-type-override.yaml @@ -5,8 +5,8 @@ vars: git_files: "features-lagoon-type-override/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml # delete the envvar if it exists already - name: "{{ testname }} - api delete envVariable on {{ project }}" @@ -16,7 +16,7 @@ envName: "LAGOON_SERVICE_TYPES" project: "{{ project }}" tasks: - - include: ../../tasks/api/delete-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-project-variable.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -26,7 +26,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml # the site should not exist, as the .lagoon.yml has a type: none for the service, so it should not deploy anything at all - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" @@ -36,7 +36,7 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml # add the environment variable - name: "{{ testname }} - api add envVariable on {{ project }}" @@ -48,7 +48,7 @@ envScope: "BUILD" project: "{{ project }}" tasks: - - include: ../../tasks/api/add-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-project-variable.yaml # if no site, then deploy with the variable defined now - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" @@ -59,7 +59,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed" hosts: localhost @@ -68,7 +68,7 @@ url: "{{ check_url }}" expected_returncode: 200 tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml # delete the envvar - name: "{{ testname }} - api delete envVariable on {{ project }}" @@ -78,7 +78,7 @@ envName: "LAGOON_SERVICE_TYPES" project: "{{ project }}" tasks: - - include: ../../tasks/api/delete-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-project-variable.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -87,7 +87,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -96,4 +96,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/limits.yaml b/tests/tests/features/limits.yaml index ff0bb281b4..ac2142a903 100644 --- a/tests/tests/features/limits.yaml +++ b/tests/tests/features/limits.yaml @@ -1,5 +1,5 @@ --- -- include: ../api/push.yaml +- ansible.builtin.import_playbook: ../api/push.yaml vars: testname: "environment limits - allow production" node_version: 16 @@ -9,7 +9,7 @@ expected_status: 200 url: "{{ check_url }}" -- include: ../api/push.yaml +- ansible.builtin.import_playbook: ../api/push.yaml vars: testname: "environment limits - allow deployment of existing branch" node_version: 16 @@ -19,7 +19,7 @@ expected_status: 200 url: "{{ check_url }}" -- include: ../api/push.yaml +- ansible.builtin.import_playbook: ../api/push.yaml vars: testname: "environment limits - prevent deployment of new branch" node_version: 16 diff --git a/tests/tests/features/multiproject.yaml b/tests/tests/features/multiproject.yaml index 91e4b6db74..e9dac798df 100644 --- a/tests/tests/features/multiproject.yaml +++ b/tests/tests/features/multiproject.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on first project {{ project1 }}" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project1 }}" namespace: "{{ project1 }}-{{ branch }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - api deployEnvironmentBranch on second project {{ project2 }}" hosts: localhost @@ -26,16 +26,16 @@ project: "{{ project2 }}" namespace: "{{ project2 }}-{{ branch }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" project: "{{ project1 }}" url: "{{ check_url1 }}" -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -50,7 +50,7 @@ host: "{{ custom_domain1 }}" expected_content: "LAGOON_ROUTE=https://{{ custom_domain1 }}" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if {{ project2 }} is deployed with accessing the custom domain and searching for the environment variable LAGOON_ROUTE" hosts: localhost @@ -60,7 +60,7 @@ host: "{{ custom_domain2 }}" expected_content: "LAGOON_ROUTE=https://{{ custom_domain2 }}" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project1 }}, which should remove all resources" hosts: localhost @@ -69,7 +69,7 @@ project: "{{ project1 }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project2 }}, which should remove all resources" hosts: localhost @@ -78,7 +78,7 @@ project: "{{ project2 }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project1 }} does not exist anymore" hosts: localhost @@ -87,7 +87,7 @@ url: "http://{{ project1 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - check if site for {{ project2 }} does not exist anymore" hosts: localhost @@ -96,4 +96,4 @@ url: "http://{{ project2 | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/namespace-labels.yaml b/tests/tests/features/namespace-labels.yaml index 647210c4df..33a6c3c89f 100644 --- a/tests/tests/features/namespace-labels.yaml +++ b/tests/tests/features/namespace-labels.yaml @@ -4,8 +4,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -15,7 +15,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: > {{ testname }} - check that the namespace is labelled correctly @@ -27,7 +27,7 @@ - "lagoon.sh/project={{ project }}" - "lagoon.sh/environment={{ branch }}" tasks: - - include: ../../checks/check-namespace-labels.yaml + - ansible.builtin.include_tasks: ../../checks/check-namespace-labels.yaml - name: > {{ testname }} - api deleteEnvironment on {{ project }}, which should remove @@ -38,4 +38,4 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml diff --git a/tests/tests/features/openshift-limit.yaml b/tests/tests/features/openshift-limit.yaml index 03a75869db..4997f36c34 100644 --- a/tests/tests/features/openshift-limit.yaml +++ b/tests/tests/features/openshift-limit.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -33,7 +33,7 @@ # project: "{{ project }}" # branch: "{{ branch }}" # tasks: -# - include: ../../tasks/api/delete-environment.yaml +# - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml # - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" # hosts: localhost @@ -42,4 +42,4 @@ # url: "{{ check_url }}" # expected_returncode: 503 # tasks: -# - include: ../../checks/check-url-returncode.yaml +# - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/promote.yaml b/tests/tests/features/promote.yaml index 60c388fa97..e4af587993 100644 --- a/tests/tests/features/promote.yaml +++ b/tests/tests/features/promote.yaml @@ -5,8 +5,8 @@ git_files: "features/" branch: "{{ source_environment }}" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }} for branch {{ source_environment }}, which will deploy our source environment" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ source_environment | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ source_environment }}" @@ -33,9 +33,9 @@ source_environment: "{{ source_environment }}" project: "{{ project }}" tasks: - - include: ../../tasks/api/promote.yaml + - ansible.builtin.include_tasks: ../../tasks/api/promote.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "" @@ -50,7 +50,7 @@ project: "{{ project }}" branch: "{{ promote_environment }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -59,7 +59,7 @@ project: "{{ project }}" branch: "{{ source_environment }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -68,7 +68,7 @@ url: "{{ check_url_promote }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -77,4 +77,4 @@ url: "{{ check_url_source }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/remote-shell.yaml b/tests/tests/features/remote-shell.yaml index 32463c4d0c..ecc08c02a3 100644 --- a/tests/tests/features/remote-shell.yaml +++ b/tests/tests/features/remote-shell.yaml @@ -4,8 +4,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -15,7 +15,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if we can connect via oc project user" hosts: localhost @@ -25,7 +25,7 @@ command: service=node env expected_content: "LAGOON_PROJECT={{ project }}" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if we can connect via oc project user and defining the container" hosts: localhost @@ -35,7 +35,7 @@ command: service=node container=node env expected_content: "LAGOON_PROJECT={{ project }}" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if we are on the right git hash via oc project user" hosts: localhost @@ -45,7 +45,7 @@ command: service=node env expected_content: "LAGOON_GIT_SHA={{ current_head }}" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - check if we are on the right git branch via oc project user" hosts: localhost @@ -55,7 +55,7 @@ command: service=node env expected_content: "LAGOON_GIT_BRANCH={{ branch }}" tasks: - - include: ../../tasks/ssh/ssh-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-command.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -64,7 +64,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -73,4 +73,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/remote-ssh-legacy.yaml b/tests/tests/features/remote-ssh-legacy.yaml index 5a61bd0e13..552c5b9c7b 100644 --- a/tests/tests/features/remote-ssh-legacy.yaml +++ b/tests/tests/features/remote-ssh-legacy.yaml @@ -4,8 +4,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -15,7 +15,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if we can connect via oc project user" hosts: localhost @@ -25,7 +25,7 @@ command: service=node env expected_content: "LAGOON_PROJECT={{ project }}" tasks: - - include: ../../tasks/ssh/ssh-legacy-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-legacy-command.yaml - name: "{{ testname }} - check if we can connect via oc project user and defining the container" hosts: localhost @@ -35,7 +35,7 @@ command: service=node container=node env expected_content: "LAGOON_PROJECT={{ project }}" tasks: - - include: ../../tasks/ssh/ssh-legacy-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-legacy-command.yaml - name: "{{ testname }} - check if we are on the right git hash via oc project user" hosts: localhost @@ -45,7 +45,7 @@ command: service=node env expected_content: "LAGOON_GIT_SHA={{ current_head }}" tasks: - - include: ../../tasks/ssh/ssh-legacy-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-legacy-command.yaml - name: "{{ testname }} - check if we are on the right git branch via oc project user" hosts: localhost @@ -55,7 +55,7 @@ command: service=node env expected_content: "LAGOON_GIT_BRANCH={{ branch }}" tasks: - - include: ../../tasks/ssh/ssh-legacy-command.yaml + - ansible.builtin.include_tasks: ../../tasks/ssh/ssh-legacy-command.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -64,7 +64,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -73,4 +73,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/route-env-variables.yaml b/tests/tests/features/route-env-variables.yaml index 805cf0a2d9..162df88ad7 100644 --- a/tests/tests/features/route-env-variables.yaml +++ b/tests/tests/features/route-env-variables.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the environment variable LAGOON_ROUTE" hosts: localhost @@ -25,7 +25,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_ROUTE=https://customdomain-will-be-main-domain.com" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the environment variable LAGOON_ROUTES" hosts: localhost @@ -34,7 +34,7 @@ url: "{{ check_url }}" expected_content: "LAGOON_ROUTES=https://customdomain-will-be-main-domain.com,https://customdomain-will-be-not-be-main-domain.com,https://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -43,7 +43,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -52,4 +52,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/short-router-url.yaml b/tests/tests/features/short-router-url.yaml index 03334c233b..188632c21f 100644 --- a/tests/tests/features/short-router-url.yaml +++ b/tests/tests/features/short-router-url.yaml @@ -5,8 +5,8 @@ vars: git_files: "features/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -17,7 +17,7 @@ lagoon_environment: "{{ lagoon_environment }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ lagoon_environment }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: > {{ testname }} - check that the auto-generated ingress has the @@ -29,7 +29,7 @@ project: "{{ project }}" lagoon_environment: "{{ lagoon_environment }}" tasks: - - include: ../../checks/check-auto-generated-ingress-short-router-url.yaml + - ansible.builtin.include_tasks: ../../checks/check-auto-generated-ingress-short-router-url.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -38,7 +38,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -47,4 +47,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/features/subfolder.yaml b/tests/tests/features/subfolder.yaml index c7dd1ff3f9..b9c2cb67d1 100644 --- a/tests/tests/features/subfolder.yaml +++ b/tests/tests/features/subfolder.yaml @@ -5,8 +5,8 @@ vars: git_files: "features-subfolder/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -32,7 +32,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -41,4 +41,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/generic.yaml b/tests/tests/generic.yaml index 952e125da9..d9ec8dcc58 100644 --- a/tests/tests/generic.yaml +++ b/tests/tests/generic.yaml @@ -1,21 +1,21 @@ --- -- 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-generic-{{ cluster_type }} git_repo_name: generic.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: generic/generic.yaml +- ansible.builtin.import_playbook: generic/generic.yaml vars: testname: "Generic {{ cluster_type|upper }}" git_repo_name: generic.git project: ci-generic-{{ cluster_type }} branch: generic-main -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-generic-{{ cluster_type }} diff --git a/tests/tests/generic/generic.yaml b/tests/tests/generic/generic.yaml index d4f866b191..43ffe4e7d2 100644 --- a/tests/tests/generic/generic.yaml +++ b/tests/tests/generic/generic.yaml @@ -5,8 +5,8 @@ vars: git_files: "generic/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,4 +16,4 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml diff --git a/tests/tests/github.yaml b/tests/tests/github.yaml index 036d4aba97..f69e8e370a 100644 --- a/tests/tests/github.yaml +++ b/tests/tests/github.yaml @@ -1,11 +1,11 @@ --- -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-github-{{ cluster_type }} git_repo_name: github.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: github/branch.yaml +- ansible.builtin.import_playbook: github/branch.yaml vars: testname: "GITHUB {{ cluster_type|upper }} - slash branch" node_version: 16 @@ -15,7 +15,7 @@ check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" # This project has a branch regex that does not match `banana`. -- include: github/branch-picky.yaml +- ansible.builtin.import_playbook: github/branch-picky.yaml vars: testname: "GITHUB {{ cluster_type|upper }} - picky branch" node_version: 16 @@ -24,7 +24,7 @@ branch: github/slash/banana check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: github/pullrequest.yaml +- ansible.builtin.import_playbook: github/pullrequest.yaml vars: testname: "GITHUB {{ cluster_type|upper }} - PULLREQUEST" node_version: 16 @@ -32,7 +32,7 @@ project: ci-github-{{ cluster_type }} check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ route_suffix }}" -- include: github/skip-deployment.yaml +- ansible.builtin.import_playbook: github/skip-deployment.yaml vars: testname: "GITHUB {{ cluster_type|upper }} - skip deployment" branch: skip @@ -41,6 +41,6 @@ project: ci-github-{{ cluster_type }} check_url: "http://node.{{ project | regex_replace('_', '-') }}.skip.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-github-{{ cluster_type }} diff --git a/tests/tests/github/branch-picky.yaml b/tests/tests/github/branch-picky.yaml index dad72f50b6..ea865fc327 100644 --- a/tests/tests/github/branch-picky.yaml +++ b/tests/tests/github/branch-picky.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - webhook github push first commit hash to repo" hosts: localhost @@ -15,9 +15,9 @@ git_hash_push: "{{ current_head }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -30,7 +30,7 @@ vars: git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push-delete.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -39,4 +39,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/github/branch.yaml b/tests/tests/github/branch.yaml index 740a952c09..74b0e3724f 100644 --- a/tests/tests/github/branch.yaml +++ b/tests/tests/github/branch.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - webhook github push first commit hash to repo" hosts: localhost @@ -15,10 +15,10 @@ git_hash_push: "{{ current_head }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -29,7 +29,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - webhook github push second commit hash to repo" hosts: localhost @@ -38,9 +38,9 @@ git_hash_push: "{{ current_head }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -51,7 +51,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - set_fact: third_commit_hash: "{{ current_head }}" @@ -60,7 +60,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - webhook github push for third commit (fourth commit exists but will not yet be deployed)" hosts: localhost @@ -69,9 +69,9 @@ git_hash_push: "{{ third_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ third_commit_hash }}" expected_branch: "{{ branch }}" @@ -84,7 +84,7 @@ vars: git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push-delete.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -93,4 +93,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/github/pullrequest.yaml b/tests/tests/github/pullrequest.yaml index 081687a9dd..336bb800ea 100644 --- a/tests/tests/github/pullrequest.yaml +++ b/tests/tests/github/pullrequest.yaml @@ -6,8 +6,8 @@ git_files: "node{{ node_version }}/" branch: "pullrequest_base" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - save base branch commit" hosts: localhost @@ -22,7 +22,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -43,17 +43,17 @@ git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: PR Title \"quoted\" & [special chars] tasks: - - include: ../../tasks/webhook-github/pullrequest-opened.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/pullrequest-opened.yaml -# - include: ../../checks/check-branch-sha.yaml +# - ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml # vars: # expected_head: "{{ pr_commit_hash }}" # expected_branch: "pr-1" # project: "{{ project }}" # url: "{{ check_url }}" -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -69,7 +69,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -90,16 +90,16 @@ git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: PR Title \"quoted\" & [special chars] - UPDATE tasks: - - include: ../../tasks/webhook-github/pullrequest-synchronize.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/pullrequest-synchronize.yaml -# - include: ../../checks/check-branch-sha.yaml +# - ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml # vars: # expected_head: "{{ pr_2nd_commit_hash }}" # expected_branch: "pr-1" # project: "{{ project }}" # url: "{{ check_url }}" -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -120,7 +120,7 @@ git_pr_number: "1" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/pullrequest-closed.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/pullrequest-closed.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -129,4 +129,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/github/skip-deployment.yaml b/tests/tests/github/skip-deployment.yaml index 0a27a74518..1946ae8ed5 100644 --- a/tests/tests/github/skip-deployment.yaml +++ b/tests/tests/github/skip-deployment.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: first_commit_hash: "{{ current_head }}" @@ -17,9 +17,9 @@ git_hash_push: "{{ first_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ first_commit_hash }}" expected_branch: "{{ branch }}" @@ -31,7 +31,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - set_fact: second_commit_hash: "{{ current_head }}" @@ -42,7 +42,7 @@ git_hash_push: "{{ second_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push-skipdeploy.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push-skipdeploy.yaml - name: "{{ testname }} - wait for 60 seconds to give an eventual running deployment time to run, after that check again if the first commit is still there" hosts: localhost @@ -50,9 +50,9 @@ vars: seconds: "60" tasks: - - include: ../../tasks/pause.yaml + - ansible.builtin.include_tasks: ../../tasks/pause.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ first_commit_hash }}" expected_branch: "{{ branch }}" @@ -65,7 +65,7 @@ vars: git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push-delete.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -74,4 +74,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/gitlab.yaml b/tests/tests/gitlab.yaml index f9d04024f1..4c07809633 100644 --- a/tests/tests/gitlab.yaml +++ b/tests/tests/gitlab.yaml @@ -1,11 +1,11 @@ --- -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-gitlab-{{ cluster_type }} git_repo_name: gitlab.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: gitlab/skip-deployment.yaml +- ansible.builtin.import_playbook: gitlab/skip-deployment.yaml vars: testname: "GITLAB {{ cluster_type|upper }} - skip deployment" node_version: 16 @@ -14,7 +14,7 @@ branch: skip check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: gitlab/branch.yaml +- ansible.builtin.import_playbook: gitlab/branch.yaml vars: testname: "GITLAB {{ cluster_type|upper }} - slash branch" node_version: 16 @@ -23,7 +23,7 @@ branch: gitlab/slash/branch check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: gitlab/pullrequest.yaml +- ansible.builtin.import_playbook: gitlab/pullrequest.yaml vars: testname: "GITLAB {{ cluster_type|upper }} - PULLREQUEST" node_version: 16 @@ -31,6 +31,6 @@ project: ci-gitlab-{{ cluster_type }} check_url: "http://node.{{ project | regex_replace('_', '-') }}.pr-1.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-gitlab-{{ cluster_type }} diff --git a/tests/tests/gitlab/branch.yaml b/tests/tests/gitlab/branch.yaml index e50dc30ecb..9396ffa83c 100644 --- a/tests/tests/gitlab/branch.yaml +++ b/tests/tests/gitlab/branch.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - webhook gitlab push first commit hash to repo" hosts: localhost @@ -15,10 +15,10 @@ git_hash_push: "{{ current_head }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-gitlab/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -29,7 +29,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - webhook gitlab push second commit hash to repo" hosts: localhost @@ -38,9 +38,9 @@ git_hash_push: "{{ current_head }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-gitlab/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -51,7 +51,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - set_fact: third_commit_hash: "{{ current_head }}" @@ -60,7 +60,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - webhook gitlab push for third commit (fourth commit exists but will not yet be deployed)" hosts: localhost @@ -69,9 +69,9 @@ git_hash_push: "{{ third_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-gitlab/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ third_commit_hash }}" expected_branch: "{{ branch }}" @@ -84,7 +84,7 @@ vars: git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-gitlab/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push-delete.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -93,4 +93,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/gitlab/pullrequest.yaml b/tests/tests/gitlab/pullrequest.yaml index 09a181b107..48a5f77bf2 100644 --- a/tests/tests/gitlab/pullrequest.yaml +++ b/tests/tests/gitlab/pullrequest.yaml @@ -6,8 +6,8 @@ git_files: "node{{ node_version }}/" branch: "pullrequest_base" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - save base branch commit" hosts: localhost @@ -22,7 +22,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -42,18 +42,18 @@ git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: "PR Title" tasks: - - include: ../../tasks/webhook-gitlab/pullrequest-opened.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/pullrequest-opened.yaml # pullrequest type doesn't have a LAGOON_GIT_BRANCH to check? -#- include: ../../checks/check-branch-sha.yaml +#- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml # vars: # expected_head: "{{ pr_commit_hash }}" # expected_branch: "pr-1" # project: "{{ project }}" # url: "{{ check_url }}" -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -69,7 +69,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -89,16 +89,16 @@ git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" git_pr_title: "PR Title - UPDATE" tasks: - - include: ../../tasks/webhook-gitlab/pullrequest-updated.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/pullrequest-updated.yaml -# - include: ../../checks/check-branch-sha.yaml +# - ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml # vars: # expected_head: "{{ pr_2nd_commit_hash }}" # expected_branch: "pr-1" # project: "{{ project }}" # url: "{{ check_url }}" -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -118,7 +118,7 @@ git_pr_number: "1" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-gitlab/pullrequest-closed.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/pullrequest-closed.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -127,4 +127,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/gitlab/skip-deployment.yaml b/tests/tests/gitlab/skip-deployment.yaml index b526037378..bfd8c7be3a 100644 --- a/tests/tests/gitlab/skip-deployment.yaml +++ b/tests/tests/gitlab/skip-deployment.yaml @@ -5,8 +5,8 @@ vars: git_files: "node{{ node_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - set_fact: first_commit_hash: "{{ current_head }}" @@ -17,9 +17,9 @@ git_hash_push: "{{ first_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-gitlab/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ first_commit_hash }}" expected_branch: "{{ branch }}" @@ -31,7 +31,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - set_fact: second_commit_hash: "{{ current_head }}" @@ -42,7 +42,7 @@ git_hash_push: "{{ second_commit_hash }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-gitlab/push-skipdeploy.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push-skipdeploy.yaml - name: "{{ testname }} - wait for 60 seconds to give an eventual running deployment time to run, after that check again if the first commit is still there" hosts: localhost @@ -50,9 +50,9 @@ vars: seconds: "60" tasks: - - include: ../../tasks/pause.yaml + - ansible.builtin.include_tasks: ../../tasks/pause.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ first_commit_hash }}" expected_branch: "{{ branch }}" @@ -65,7 +65,7 @@ vars: git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-gitlab/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push-delete.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -74,4 +74,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/helpers/just-push.yaml b/tests/tests/helpers/just-push.yaml index 1fcc0eaea7..0829cff687 100644 --- a/tests/tests/helpers/just-push.yaml +++ b/tests/tests/helpers/just-push.yaml @@ -18,6 +18,6 @@ git_hash_push: "{{ current_head }}" git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push.yaml - - include: ../../tasks/webhook-bitbucket/push.yaml - - include: ../../tasks/webhook-gitlab/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-bitbucket/push.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push.yaml diff --git a/tests/tests/helpers/testing.yaml b/tests/tests/helpers/testing.yaml index 5ad6fb11f9..f4f76faa33 100644 --- a/tests/tests/helpers/testing.yaml +++ b/tests/tests/helpers/testing.yaml @@ -2,4 +2,4 @@ hosts: localhost serial: 1 tasks: - - include: ../../checks/check-url-returncode.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/helpers/webhook-push-delete.yaml b/tests/tests/helpers/webhook-push-delete.yaml index 977c810825..7f5460e0ea 100644 --- a/tests/tests/helpers/webhook-push-delete.yaml +++ b/tests/tests/helpers/webhook-push-delete.yaml @@ -4,5 +4,5 @@ vars: git_repo_ssh_url: "{{ localgit_url }}/{{ git_repo_name }}" tasks: - - include: ../../tasks/webhook-github/push-delete.yaml - - include: ../../tasks/webhook-gitlab/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-github/push-delete.yaml + - ansible.builtin.include_tasks: ../../tasks/webhook-gitlab/push-delete.yaml diff --git a/tests/tests/image-cache.yaml b/tests/tests/image-cache.yaml index bdcb8813ab..d27e871ef9 100644 --- a/tests/tests/image-cache.yaml +++ b/tests/tests/image-cache.yaml @@ -1,15 +1,15 @@ --- -- 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-image-cache-{{ cluster_type }} git_repo_name: image-cache.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: image-cache/image-cache.yaml +- ansible.builtin.import_playbook: image-cache/image-cache.yaml vars: testname: "image-cache {{ cluster_type|upper }}" git_repo_name: image-cache.git @@ -18,6 +18,6 @@ check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" openshift_project_name: ci-image-cache-{{ cluster_type }}-image-cache -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-image-cache-{{ cluster_type }} diff --git a/tests/tests/image-cache/image-cache.yaml b/tests/tests/image-cache/image-cache.yaml index d11dd2ace5..c088efba87 100644 --- a/tests/tests/image-cache/image-cache.yaml +++ b/tests/tests/image-cache/image-cache.yaml @@ -5,8 +5,8 @@ vars: git_files: "image-cache/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'TO BE REPLACED' which is added by hand" hosts: localhost @@ -25,7 +25,7 @@ url: "{{ check_url }}" expected_content: "TO BE REPLACED" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should redeploy" hosts: localhost @@ -35,7 +35,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with cache value 'REPLACED BY CACHE'" hosts: localhost @@ -44,7 +44,7 @@ url: "{{ check_url }}" expected_content: "REPLACED BY CACHE" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -53,7 +53,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -62,4 +62,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/nginx.yaml b/tests/tests/nginx.yaml index 0d8cf1b83b..aa0e1442b3 100644 --- a/tests/tests/nginx.yaml +++ b/tests/tests/nginx.yaml @@ -1,23 +1,23 @@ --- -- 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: testname: "NGINX {{ cluster_type|upper }}" project: ci-nginx-{{ cluster_type }} git_repo_name: nginx.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: nginx/nginx.yaml +- ansible.builtin.import_playbook: nginx/nginx.yaml vars: testname: "NGINX {{ cluster_type|upper }}" git_repo_name: nginx.git project: ci-nginx-{{ cluster_type }} branch: nginx -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: testname: "NGINX {{ cluster_type|upper }}" project: ci-nginx-{{ cluster_type }} diff --git a/tests/tests/nginx/check-first.yaml b/tests/tests/nginx/check-first.yaml index 885a20f271..97b8b9c3ab 100644 --- a/tests/tests/nginx/check-first.yaml +++ b/tests/tests/nginx/check-first.yaml @@ -6,7 +6,7 @@ host: "test1.example.com" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'Hello World!'" hosts: localhost @@ -15,7 +15,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if auto generated domain allows secure traffic" hosts: localhost @@ -25,7 +25,7 @@ host: "nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix_https }}" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-allow.com' is created and allows insecure traffic" hosts: localhost @@ -35,7 +35,7 @@ host: "insecure-allow.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-allow.com' is created and allows secure traffic" hosts: localhost @@ -45,7 +45,7 @@ host: "insecure-allow.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-redirect.com' is created and redirects to https" hosts: localhost @@ -55,7 +55,7 @@ host: "insecure-redirect.com" expected_redirect_location: "https://insecure-redirect.com/?$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-redirect.com' is created and allows secure traffic" hosts: localhost @@ -65,7 +65,7 @@ host: "insecure-redirect.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-none.com' does not allow http" hosts: localhost @@ -76,7 +76,7 @@ host: "insecure-none.com" expected_returncode: 503 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - check if custom domain 'insecure-none.com' is created and allows secure traffic" hosts: localhost @@ -86,7 +86,7 @@ host: "insecure-none.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'moving-route.com' is created and does not ask for basic auth" hosts: localhost @@ -96,7 +96,7 @@ host: "moving-route.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - check if custom domain 'hsts-header.com' is created and has HSTS header set" hosts: localhost @@ -108,7 +108,7 @@ expected_header: "strict_transport_security" expected_header_value: "max-age=15768000" tasks: - - include: ../../checks/check-url-header.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header.yaml - name: "{{ testname }} - check if custom domain 'hsts-header-null.com' is created and does not have HSTS header set" hosts: localhost @@ -119,7 +119,7 @@ expected_returncode: 200 expected_header: "strict_transport_security" tasks: - - include: ../../checks/check-url-header-absent.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header-absent.yaml - name: "{{ testname }} - check if {{ project }} is redirecting correctly with no preserve'" hosts: localhost @@ -128,7 +128,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-no-preserve/should/be/missing?arg1" expected_redirect_location: "foo.com$" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - check if {{ project }} is redirecting correctly with preserving'" hosts: localhost @@ -137,7 +137,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-preserve/should/be/existing?arg1" expected_redirect_location: "foo.com/redirect-preserve/should/be/existing\\?arg1$" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - check if {{ project }} is redirecting correctly with preserving only URI'" hosts: localhost @@ -146,7 +146,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-preserve-uri-only/should/be/existing?should-be-gone" expected_redirect_location: "foo.com/redirect-preserve-uri-only/should/be/existing$" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - check if {{ project }} is redirecting correctly with stripping of url'" hosts: localhost @@ -155,7 +155,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redirect-strip-args-handling/should/be/existing?arg1" expected_redirect_location: "foo.com/should/be/existing\\?arg1$" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - check if {{ project }} is requesting a basic auth" hosts: localhost @@ -164,7 +164,7 @@ url: "http://nginx-basic-auth.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: 401 tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - check if {{ project }} is deployed and basic auth works" hosts: localhost @@ -175,7 +175,7 @@ user: "username" password: "password" tasks: - - include: ../../checks/check-url-content-basic-auth.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-basic-auth.yaml - name: "{{ testname }} - check if {{ project }} is deployed and basic auth disable via .env variable works" hosts: localhost @@ -184,7 +184,7 @@ url: "http://nginx-basic-auth-disable.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if custom domain nginx-basic-auth.com is working and does basic auth" hosts: localhost @@ -196,4 +196,4 @@ password: "password" host: "nginx-basic-auth.com" tasks: - - include: ../../checks/check-url-content-basic-auth-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-basic-auth-host.yaml diff --git a/tests/tests/nginx/check-fourth.yaml b/tests/tests/nginx/check-fourth.yaml index 52cfd5521e..6e00f388dc 100644 --- a/tests/tests/nginx/check-fourth.yaml +++ b/tests/tests/nginx/check-fourth.yaml @@ -5,7 +5,7 @@ url: "http://nginx-{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_redirect_location: "https://nginx-{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - FOURTH TEST: check if auto generated domain redirects insecure traffic" hosts: localhost @@ -15,7 +15,7 @@ host: "nginx-{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_redirect_location: "https://nginx-{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - FOURTH TEST: check if custom domain 'insecure-allow.com' now does not allow insecure anymore" hosts: localhost @@ -26,7 +26,7 @@ host: "insecure-allow.com" expected_returncode: 503 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - FOURTH TEST: check if custom domain 'insecure-redirect.com' is created and still redirects to https" hosts: localhost @@ -36,7 +36,7 @@ host: "insecure-redirect.com" expected_redirect_location: "https://insecure-redirect.com/?$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - FOURTH TEST: check if custom domain 'insecure-none.com' now allows http" hosts: localhost @@ -46,7 +46,7 @@ host: "insecure-none.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - FOURTH TEST: check if custom domain 'moving-route.com' is moved and now requests basic auth" hosts: localhost @@ -56,7 +56,7 @@ host: "moving-route.com" expected_returncode: 401 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - FOURTH TEST: check if custom domain 'hsts-header-null.com' now has HSTS header set" hosts: localhost @@ -68,7 +68,7 @@ expected_header: "strict_transport_security" expected_header_value: "max-age=15768000" tasks: - - include: ../../checks/check-url-header.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header.yaml - name: "{{ testname }} - FOURTH TEST: check if custom domain 'hsts-header.com' is created and does not have HSTS header set" hosts: localhost @@ -79,4 +79,4 @@ expected_returncode: 200 expected_header: "strict_transport_security" tasks: - - include: ../../checks/check-url-header-absent.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header-absent.yaml diff --git a/tests/tests/nginx/check-second.yaml b/tests/tests/nginx/check-second.yaml index 06453139f5..db9e02281b 100644 --- a/tests/tests/nginx/check-second.yaml +++ b/tests/tests/nginx/check-second.yaml @@ -5,7 +5,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_redirect_location: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - SECOND TEST: check if auto generated domain redirects insecure traffic" hosts: localhost @@ -15,7 +15,7 @@ host: "nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_redirect_location: "https://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ lookup('env','ROUTE_SUFFIX_HTTPS') }}" tasks: - - include: ../../checks/check-url-redirect.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'insecure-allow.com' now does not allow insecure anymore" hosts: localhost @@ -26,7 +26,7 @@ host: "insecure-allow.com" expected_returncode: 503 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'insecure-redirect.com' is created and still redirects to https" hosts: localhost @@ -36,7 +36,7 @@ host: "insecure-redirect.com" expected_redirect_location: "https://insecure-redirect.com/?$" tasks: - - include: ../../checks/check-url-redirect-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-redirect-host.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'insecure-none.com' now allows http" hosts: localhost @@ -46,7 +46,7 @@ host: "insecure-none.com" expected_content: "Hello World!" tasks: - - include: ../../checks/check-url-content-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content-host.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'moving-route.com' is moved and now requests basic auth" hosts: localhost @@ -56,7 +56,7 @@ host: "moving-route.com" expected_returncode: 401 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'hsts-header-null.com' now has HSTS header set" hosts: localhost @@ -68,7 +68,7 @@ expected_header: "strict_transport_security" expected_header_value: "max-age=15768000" tasks: - - include: ../../checks/check-url-header.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header.yaml - name: "{{ testname }} - SECOND TEST: check if custom domain 'hsts-header.com' is created and does not have HSTS header set" hosts: localhost @@ -79,4 +79,4 @@ expected_returncode: 200 expected_header: "strict_transport_security" tasks: - - include: ../../checks/check-url-header-absent.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-header-absent.yaml diff --git a/tests/tests/nginx/check-third.yaml b/tests/tests/nginx/check-third.yaml index fda3be7c9e..50b47f02a0 100644 --- a/tests/tests/nginx/check-third.yaml +++ b/tests/tests/nginx/check-third.yaml @@ -6,4 +6,4 @@ host: "test1.example.com" expected_returncode: 200 tasks: - - include: ../../checks/check-url-returncode-host.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode-host.yaml diff --git a/tests/tests/nginx/nginx.yaml b/tests/tests/nginx/nginx.yaml index e71cd7f090..290972d2cb 100644 --- a/tests/tests/nginx/nginx.yaml +++ b/tests/tests/nginx/nginx.yaml @@ -5,8 +5,8 @@ vars: git_files: "nginx/first/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml # delete the LAGOON_ROUTES_JSON envvar if it exists already - name: "{{ testname }} - api delete envVariable on {{ project }}" @@ -17,7 +17,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment-variable.yaml - name: "{{ testname }} - delete test1.example.com ingress if exists" hosts: localhost @@ -25,7 +25,7 @@ vars: ingress: "test1.example.com" tasks: - - include: ../../tasks/delete-ingress.yaml + - ansible.builtin.include_tasks: ../../tasks/delete-ingress.yaml - name: "{{ testname }} - api update {{ project }} router pattern to empty" hosts: localhost @@ -34,7 +34,7 @@ project: "{{ project }}" routerpattern: "" tasks: - - include: ../../tasks/api/update-project-routerpattern.yaml + - ansible.builtin.include_tasks: ../../tasks/api/update-project-routerpattern.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -44,9 +44,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-first.yaml +- ansible.builtin.import_playbook: check-first.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -58,7 +58,7 @@ vars: git_files: "nginx/second/" tasks: - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the second commit" hosts: localhost @@ -68,9 +68,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-second.yaml +- ansible.builtin.import_playbook: check-second.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -86,7 +86,7 @@ envValue: "eyJyb3V0ZXMiOlt7ImRvbWFpbiI6InRlc3QxLmV4YW1wbGUuY29tIiwic2VydmljZSI6Im5naW54IiwidGxzLWFjbWUiOmZhbHNlLCJtb25pdG9yaW5nLXBhdGgiOiIvYnlwYXNzLWNhY2hlIn1dfQo=" envScope: "BUILD" tasks: - - include: ../../tasks/api/add-environment-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-environment-variable.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the second commit again but with the LAGOON_ROUTES_JSON override" hosts: localhost @@ -96,9 +96,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-third.yaml +- ansible.builtin.import_playbook: check-third.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -113,7 +113,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment-variable.yaml - name: "{{ testname }} - api update {{ project }} router pattern" hosts: localhost @@ -122,7 +122,7 @@ project: "{{ project }}" routerpattern: "${service}-${project}-${environment}.{{ route_suffix_wo_port }}" tasks: - - include: ../../tasks/api/update-project-routerpattern.yaml + - ansible.builtin.include_tasks: ../../tasks/api/update-project-routerpattern.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the second commit again but with the LAGOON_ROUTES_JSON override" hosts: localhost @@ -132,9 +132,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: check-fourth.yaml +- ansible.builtin.import_playbook: check-fourth.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -147,7 +147,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - api update {{ project }} router pattern to empty" hosts: localhost @@ -156,7 +156,7 @@ project: "{{ project }}" routerpattern: "" tasks: - - include: ../../tasks/api/update-project-routerpattern.yaml + - ansible.builtin.include_tasks: ../../tasks/api/update-project-routerpattern.yaml - name: "{{ testname }} - check if site for ${service}. {{ project }} does not exist anymore" hosts: localhost @@ -165,7 +165,7 @@ url: "http://nginx.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml - name: "{{ testname }} - check if site with ${service}- for {{ project }} does not exist anymore" hosts: localhost @@ -174,4 +174,4 @@ url: "http://nginx-{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/node.yaml b/tests/tests/node.yaml index 6a90dba8d0..c8bac69fa1 100644 --- a/tests/tests/node.yaml +++ b/tests/tests/node.yaml @@ -1,15 +1,15 @@ --- -- 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-node-{{ cluster_type }} git_repo_name: node.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: api/deploy-branch.yaml +- ansible.builtin.import_playbook: api/deploy-branch.yaml vars: testname: "NODE 16 {{ cluster_type|upper }}" node_version: 16 @@ -18,7 +18,7 @@ branch: node16 check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/deploy-branch.yaml +- ansible.builtin.import_playbook: api/deploy-branch.yaml vars: testname: "NODE 14 {{ cluster_type|upper }}" node_version: 14 @@ -27,6 +27,6 @@ branch: node14 check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-node-{{ cluster_type }} diff --git a/tests/tests/python.yaml b/tests/tests/python.yaml index fe5c244149..8748c12f56 100644 --- a/tests/tests/python.yaml +++ b/tests/tests/python.yaml @@ -1,15 +1,15 @@ --- -- 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-python-{{ cluster_type }} git_repo_name: python.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: python/deploy-branch.yaml +- ansible.builtin.import_playbook: python/deploy-branch.yaml vars: testname: "PYTHON 3.9 {{ cluster_type|upper }}" python_version: 3.9 @@ -18,6 +18,6 @@ branch: python39 check_url: "http://python.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-python-{{ cluster_type }} diff --git a/tests/tests/python/deploy-branch.yaml b/tests/tests/python/deploy-branch.yaml index c6fccc297b..ad6cdbfcf6 100644 --- a/tests/tests/python/deploy-branch.yaml +++ b/tests/tests/python/deploy-branch.yaml @@ -5,8 +5,8 @@ vars: git_files: "python{{ python_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -29,7 +29,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - set_fact: second_commit_hash: "{{ current_head }}" @@ -37,7 +37,7 @@ hosts: localhost serial: 1 tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch with sha of second commit on {{ project }}, which should deploy the second commit" hosts: localhost @@ -48,10 +48,10 @@ sha: "{{ second_commit_hash }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ second_commit_hash }}" expected_branch: "{{ branch }}" @@ -66,9 +66,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ current_head }}" expected_branch: "{{ branch }}" @@ -84,9 +84,9 @@ sha: "{{ second_commit_hash }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-sha.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ second_commit_hash }}" expected_branch: "{{ branch }}" @@ -100,7 +100,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -109,4 +109,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/python/deploy-pullrequest.yaml b/tests/tests/python/deploy-pullrequest.yaml index bf2245636f..7b8ef32929 100644 --- a/tests/tests/python/deploy-pullrequest.yaml +++ b/tests/tests/python/deploy-pullrequest.yaml @@ -6,8 +6,8 @@ git_files: "python{{ python_version }}/" branch: "pullrequest_base" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - save base branch commit" hosts: localhost @@ -22,7 +22,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -43,17 +43,17 @@ git_pr_title: "PR Title" namespace: "{{ project | regex_replace('_', '-') }}-pr-1" tasks: - - include: ../../tasks/api/deploy-pullrequest.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-pullrequest.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ pr_commit_hash }}" expected_branch: "pr-1" project: "{{ project }}" url: "{{ check_url }}" -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -69,7 +69,7 @@ vars: branch: "pullrequest_pr" tasks: - - include: ../../tasks/git-empty-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-empty-commit-push.yaml - name: "{{ testname }} - save pr branch commit" hosts: localhost @@ -90,16 +90,16 @@ git_pr_title: "PR Title - UPDATE" namespace: "{{ project | regex_replace('_', '-') }}-pr-1" tasks: - - include: ../../tasks/api/deploy-pullrequest.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-pullrequest.yaml -- include: ../../checks/check-branch-sha.yaml +- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml vars: expected_head: "{{ pr_2nd_commit_hash }}" expected_branch: "pr-1" project: "{{ project }}" url: "{{ check_url }}" -- include: ../../checks/check-pullrequest.yaml +- ansible.builtin.import_playbook: ../../checks/check-pullrequest.yaml vars: url: "{{ check_url }}" expected_build_type: "pullrequest" @@ -116,7 +116,7 @@ project: "{{ project }}" branch: "pr-1" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for project does not exist anymore" hosts: localhost @@ -125,4 +125,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/python/push.yaml b/tests/tests/python/push.yaml index 642327861c..995c6baa8d 100644 --- a/tests/tests/python/push.yaml +++ b/tests/tests/python/push.yaml @@ -5,8 +5,8 @@ vars: git_files: "python{{ python_version }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,9 +16,9 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml -#- include: ../../checks/check-branch-sha.yaml +#- ansible.builtin.import_playbook: ../../checks/check-branch-sha.yaml # # when: # # - expected_status != "500" # vars: diff --git a/tests/tests/services.yaml b/tests/tests/services.yaml index b64508f917..60feaabb3d 100644 --- a/tests/tests/services.yaml +++ b/tests/tests/services.yaml @@ -1,15 +1,15 @@ --- -- 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-services-{{ cluster_type }} git_repo_name: services.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: services/services.yaml +- ansible.builtin.import_playbook: services/services.yaml vars: testname: "SERVICES {{ cluster_type|upper }}" git_repo_name: services.git @@ -18,6 +18,6 @@ check_url: "http://web.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" openshift_project_name: ci-services-{{ cluster_type }}-services -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-services-{{ cluster_type }} diff --git a/tests/tests/services/services.yaml b/tests/tests/services/services.yaml index 19162e33fe..3b357cccf1 100644 --- a/tests/tests/services/services.yaml +++ b/tests/tests/services/services.yaml @@ -5,8 +5,8 @@ vars: git_files: "{{ branch }}/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: > {{ testname }} - check that the namespace is labelled correctly @@ -27,7 +27,7 @@ - "lagoon.sh/project={{ project }}" - "lagoon.sh/environment={{ branch }}" tasks: - - include: ../../checks/check-namespace-labels.yaml + - ansible.builtin.include_tasks: ../../checks/check-namespace-labels.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, mariadb 10.5 service" hosts: localhost @@ -36,7 +36,7 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mariadb-10.5" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, mariadb 10.6 service" hosts: localhost @@ -45,7 +45,7 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mariadb-10.6" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, postgres-13 service" hosts: localhost @@ -54,7 +54,7 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/postgres-13" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, postgres-14 service" hosts: localhost @@ -63,7 +63,7 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/postgres-14" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, mongo-4 service" hosts: localhost @@ -72,7 +72,7 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/mongo-4" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, solr-8 service" hosts: localhost @@ -81,7 +81,7 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/solr-8" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, redis-6 service" hosts: localhost @@ -90,7 +90,7 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/redis-6" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api add envVariable on {{ project }}" hosts: localhost @@ -101,7 +101,7 @@ envScope: "BUILD" project: "{{ project }}" tasks: - - include: ../../tasks/api/add-project-variable.yaml + - ansible.builtin.include_tasks: ../../tasks/api/add-project-variable.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -111,7 +111,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for the hash, opensearch-2 service" hosts: localhost @@ -120,7 +120,7 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}/opensearch-2" expected_content: "LAGOON_GIT_SAFE_BRANCH={{ branch }}" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -129,7 +129,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -138,4 +138,4 @@ url: "http://internal-services-test.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/ssh-legacy.yaml b/tests/tests/ssh-legacy.yaml index a18c94891d..7467ded012 100644 --- a/tests/tests/ssh-legacy.yaml +++ b/tests/tests/ssh-legacy.yaml @@ -1,15 +1,15 @@ --- -- include: features/api-token-legacy.yaml +- ansible.builtin.import_playbook: features/api-token-legacy.yaml vars: testname: "API TOKEN" -- include: api/add-project.yaml +- ansible.builtin.import_playbook: api/add-project.yaml vars: project: ci-ssh-legacy-{{ cluster_type }} git_repo_name: features.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: features/remote-ssh-legacy.yaml +- ansible.builtin.import_playbook: features/remote-ssh-legacy.yaml vars: testname: "REMOTE SSH LEGACY {{ cluster_type|upper }}" node_version: 16 @@ -18,6 +18,6 @@ branch: remoteshell check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-ssh-legacy-{{ cluster_type }} diff --git a/tests/tests/tasks.yaml b/tests/tests/tasks.yaml index 4a8625802d..6924202e51 100644 --- a/tests/tests/tasks.yaml +++ b/tests/tests/tasks.yaml @@ -1,15 +1,15 @@ --- -- 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-tasks-{{ cluster_type }} git_repo_name: tasks.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: tasks/tasks.yaml +- ansible.builtin.import_playbook: tasks/tasks.yaml vars: testname: "TASKS {{ cluster_type|upper }}" git_repo_name: tasks.git @@ -18,6 +18,6 @@ check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" openshift_project_name: ci-tasks-{{ cluster_type }}-tasks -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-tasks-{{ cluster_type }} diff --git a/tests/tests/tasks/create-and-register-task.yaml b/tests/tests/tasks/create-and-register-task.yaml index 335b322c46..c2cc1fa38c 100644 --- a/tests/tests/tasks/create-and-register-task.yaml +++ b/tests/tests/tasks/create-and-register-task.yaml @@ -1,6 +1,6 @@ - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ graphql_url }}" block: - - include: ../../tasks/api/refresh-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/refresh-token.yaml - name: "{{ testname }} - print openshift variable debug inside subtask" debug: msg: "openshift id {{ openshift_project_name }}" @@ -17,7 +17,7 @@ - name: "{{ testname }} - environmentByOSProjectNameApiResponse" debug: msg: "api response: {{ environmentByOSProjectNameApiResponse.json.data.environmentByOpenshiftProjectName.id }}" - - include: ./post-api-register-task-command.yaml + - ansible.builtin.include_tasks: ./post-api-register-task-command.yaml - name: "{{ testname }} - DEBUG taskCreateApiResponse" debug: msg: "api response: {{ taskCreateApiResponse }}" @@ -36,4 +36,4 @@ until: - name: "{{ testname }} - POST api invokeRegisteredTask to {{ graphql_url }}" debug: - msg: "api response: {{ invokeRegisteredTaskApiResponse.json }}" \ No newline at end of file + msg: "api response: {{ invokeRegisteredTaskApiResponse.json }}" diff --git a/tests/tests/tasks/create-register-and-test-image-task.yaml b/tests/tests/tasks/create-register-and-test-image-task.yaml index 66870cb6ca..cca9e528ee 100644 --- a/tests/tests/tasks/create-register-and-test-image-task.yaml +++ b/tests/tests/tasks/create-register-and-test-image-task.yaml @@ -1,6 +1,6 @@ - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ graphql_url }}" block: - - include: ../../tasks/api/admin-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/admin-token.yaml - name: "{{ testname }} - print openshift variable debug inside subtask" debug: msg: "openshift id {{ openshift_project_name }}" @@ -17,7 +17,7 @@ - name: "{{ testname }} - environmentByOSProjectNameApiResponse" debug: msg: "api response: {{ environmentByOSProjectNameApiResponse.json.data.environmentByOpenshiftProjectName.id }}" - - include: ./post-api-register-task.yaml + - ansible.builtin.include_tasks: ./post-api-register-task.yaml - name: "{{ testname }} - DEBUG taskCreateApiResponse" debug: msg: "api response: {{ taskCreateApiResponse }}" @@ -48,4 +48,4 @@ register: result until: (result.json.data.taskById.status == "complete" or result.json.data.taskById.status == "succeeded") retries: 90 - delay: 20 \ No newline at end of file + delay: 20 diff --git a/tests/tests/tasks/post-api-register-task-command.yaml b/tests/tests/tasks/post-api-register-task-command.yaml index a76cf99a86..7538083258 100644 --- a/tests/tests/tasks/post-api-register-task-command.yaml +++ b/tests/tests/tasks/post-api-register-task-command.yaml @@ -1,6 +1,6 @@ - name: 'Wait until success' block: - - include: ../../tasks/api/admin-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/admin-token.yaml - name: Set the retry count set_fact: retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}" @@ -26,4 +26,4 @@ - debug: msg: "Failed to connect - Retrying..." - - include_tasks: ./post-api-register-task-command.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ./post-api-register-task-command.yaml diff --git a/tests/tests/tasks/post-api-register-task.yaml b/tests/tests/tasks/post-api-register-task.yaml index cb931ff0eb..d0253996a8 100644 --- a/tests/tests/tasks/post-api-register-task.yaml +++ b/tests/tests/tasks/post-api-register-task.yaml @@ -1,6 +1,6 @@ - name: 'Wait until success' block: - - include: ../../tasks/api/admin-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/admin-token.yaml - name: Set the retry count set_fact: retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}" @@ -26,4 +26,4 @@ - debug: msg: "Failed to connect - Retrying..." - - include_tasks: ./post-api-register-task.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ./post-api-register-task.yaml diff --git a/tests/tests/tasks/tasks.yaml b/tests/tests/tasks/tasks.yaml index 1067dfa3f4..ac84897c97 100644 --- a/tests/tests/tasks/tasks.yaml +++ b/tests/tests/tasks/tasks.yaml @@ -5,8 +5,8 @@ vars: git_files: "tasks/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'TO BE REPLACED' which is added by hand" hosts: localhost @@ -25,14 +25,14 @@ url: "{{ check_url }}" expected_content: "TO BE REPLACED" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - POST api Add task to {{ project }} via {{ graphql_url }}" hosts: localhost serial: 1 tasks: - - include: ../../tasks/api/refresh-token.yaml - - include: ./create-and-register-task.yaml + - ansible.builtin.include_tasks: ../../tasks/api/refresh-token.yaml + - ansible.builtin.include_tasks: ./create-and-register-task.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'REPLACED BY TASK' which is added by the task" hosts: localhost @@ -41,14 +41,14 @@ url: "{{ check_url }}" expected_content: "REPLACED BY TASK" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml # - name: "{{ testname }} - POST api Add Image task to {{ project }} via {{ graphql_url }}" # hosts: localhost # serial: 1 # tasks: -# - include: ../../tasks/api/refresh-token.yaml -# - include: ./create-register-and-test-image-task.yaml +# - ansible.builtin.include_tasks: ../../tasks/api/refresh-token.yaml +# - ansible.builtin.include_tasks: ./create-register-and-test-image-task.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" hosts: localhost @@ -57,7 +57,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -66,4 +66,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml diff --git a/tests/tests/workflows.yaml b/tests/tests/workflows.yaml index b11b8665bf..2ea2b80c0f 100644 --- a/tests/tests/workflows.yaml +++ b/tests/tests/workflows.yaml @@ -1,15 +1,15 @@ --- -- 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-workflows-{{ cluster_type }} git_repo_name: tasks.git git_url: "{{ localgit_url }}/{{ git_repo_name }}" -- include: workflows/workflows.yaml +- ansible.builtin.import_playbook: workflows/workflows.yaml vars: testname: "WORKFLOWS {{ cluster_type|upper }}" git_repo_name: tasks.git @@ -18,6 +18,6 @@ check_url: "http://node.{{ project | regex_replace('_', '-') }}.{{ branch | regex_replace('/', '-') }}.{{ route_suffix }}" openshift_project_name: ci-workflows-{{ cluster_type }}-workflows -- include: api/delete-project.yaml +- ansible.builtin.import_playbook: api/delete-project.yaml vars: project: ci-workflows-{{ cluster_type }} diff --git a/tests/tests/workflows/create-and-register-task.yaml b/tests/tests/workflows/create-and-register-task.yaml index faacfbce5f..ad10fb080f 100644 --- a/tests/tests/workflows/create-and-register-task.yaml +++ b/tests/tests/workflows/create-and-register-task.yaml @@ -1,6 +1,6 @@ - name: "{{ testname }} - POST api deployEnvironmentBranch with target git branch {{ branch }} and project {{ project }} (no sha) to {{ graphql_url }}" block: - - include: ../../tasks/api/refresh-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/refresh-token.yaml - name: "{{ testname }} - print openshift variable debug inside subtask" debug: msg: "openshift id {{ openshift_project_name }}" @@ -20,7 +20,7 @@ - name: "{{ testname }} - environmentByOSProjectNameApiResponse" debug: msg: "api response: {{ environmentByOSProjectNameApiResponse }}" - - include: ./post-api-register-task-command.yaml + - ansible.builtin.include_tasks: ./post-api-register-task-command.yaml - name: "{{ testname }} - DEBUG taskCreateApiResponse" debug: msg: "api response: {{ taskCreateApiResponse }}" @@ -40,7 +40,7 @@ - name: "{{ testname }} - projectByNameResponse" debug: msg: "api response: {{ projectByNameResponse.json.data.projectByName.id }}" - - include: ./post-api-register-workflow.yaml + - ansible.builtin.include_tasks: ./post-api-register-workflow.yaml - name: "{{ testname }} - DEBUG taskCreateApiResponse" debug: msg: "api response: {{ taskCreateApiResponse }}" diff --git a/tests/tests/workflows/post-api-delete-workflow.yaml b/tests/tests/workflows/post-api-delete-workflow.yaml index f82d22b6fa..7de7ad7193 100644 --- a/tests/tests/workflows/post-api-delete-workflow.yaml +++ b/tests/tests/workflows/post-api-delete-workflow.yaml @@ -1,6 +1,6 @@ - name: 'Wait until success' block: - - include: ../../tasks/api/admin-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/admin-token.yaml - name: Set the retry count set_fact: retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}" @@ -31,4 +31,4 @@ - debug: msg: "Failed to connect - Retrying..." - - include_tasks: ./post-api-delete-workflow.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ./post-api-delete-workflow.yaml diff --git a/tests/tests/workflows/post-api-register-task-command.yaml b/tests/tests/workflows/post-api-register-task-command.yaml index 260a031762..37b5717a35 100644 --- a/tests/tests/workflows/post-api-register-task-command.yaml +++ b/tests/tests/workflows/post-api-register-task-command.yaml @@ -1,6 +1,6 @@ - name: 'Wait until success' block: - - include: ../../tasks/api/admin-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/admin-token.yaml - name: Set the retry count set_fact: retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}" @@ -26,4 +26,4 @@ - debug: msg: "Failed to connect - Retrying..." - - include_tasks: ./post-api-register-task-command.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ./post-api-register-task-command.yaml diff --git a/tests/tests/workflows/post-api-register-workflow.yaml b/tests/tests/workflows/post-api-register-workflow.yaml index 798951169c..b6ea422740 100644 --- a/tests/tests/workflows/post-api-register-workflow.yaml +++ b/tests/tests/workflows/post-api-register-workflow.yaml @@ -1,6 +1,6 @@ - name: 'Wait until success' block: - - include: ../../tasks/api/admin-token.yaml + - ansible.builtin.include_tasks: ../../tasks/api/admin-token.yaml - name: Set the retry count set_fact: retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}" @@ -31,4 +31,4 @@ - debug: msg: "Failed to connect - Retrying..." - - include_tasks: ./post-api-register-workflow.yaml \ No newline at end of file + - ansible.builtin.include_tasks: ./post-api-register-workflow.yaml diff --git a/tests/tests/workflows/workflows.yaml b/tests/tests/workflows/workflows.yaml index ef57a3994b..de4f8a2b76 100644 --- a/tests/tests/workflows/workflows.yaml +++ b/tests/tests/workflows/workflows.yaml @@ -5,8 +5,8 @@ vars: git_files: "tasks/" tasks: - - include: ../../tasks/git-init.yaml - - include: ../../tasks/git-add-commit-push.yaml + - ansible.builtin.include_tasks: ../../tasks/git-init.yaml + - ansible.builtin.include_tasks: ../../tasks/git-add-commit-push.yaml - name: "{{ testname }} - api deployEnvironmentBranch on {{ project }}, which should deploy the first commit" hosts: localhost @@ -16,7 +16,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'TO BE REPLACED' which is added by hand" hosts: localhost @@ -25,14 +25,14 @@ url: "{{ check_url }}" expected_content: "TO BE REPLACED" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - POST api Add task to {{ project }} via {{ graphql_url }}" hosts: localhost serial: 1 tasks: - - include: ../../tasks/api/refresh-token.yaml - - include: ./create-and-register-task.yaml + - ansible.builtin.include_tasks: ../../tasks/api/refresh-token.yaml + - ansible.builtin.include_tasks: ./create-and-register-task.yaml - name: debugger hosts: localhost @@ -49,7 +49,7 @@ project: "{{ project }}" namespace: "{{ project | regex_replace('_', '-') }}-{{ branch | regex_replace('/', '-') }}" tasks: - - include: ../../tasks/api/deploy-no-sha.yaml + - ansible.builtin.include_tasks: ../../tasks/api/deploy-no-sha.yaml - name: "{{ testname }} - check if {{ project }} is deployed with searching for 'REPLACED BY TASK' which is added by the task" hosts: localhost @@ -58,7 +58,7 @@ url: "{{ check_url }}" expected_content: "REPLACED BY TASK" tasks: - - include: ../../checks/check-url-content.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-content.yaml - name: "{{ testname }} - Delete created workflow" hosts: localhost @@ -66,7 +66,7 @@ vars: deleteWorkflowId: "{{ workflowCreateApiResponse.json.data.addWorkflow.id }}" tasks: - - include: ./post-api-delete-workflow.yaml + - ansible.builtin.include_tasks: ./post-api-delete-workflow.yaml - name: "{{ testname }} - api deleteEnvironment on {{ project }}, which should remove all resources" @@ -76,7 +76,7 @@ project: "{{ project }}" branch: "{{ branch }}" tasks: - - include: ../../tasks/api/delete-environment.yaml + - ansible.builtin.include_tasks: ../../tasks/api/delete-environment.yaml - name: "{{ testname }} - check if site for {{ project }} does not exist anymore" hosts: localhost @@ -85,4 +85,4 @@ url: "{{ check_url }}" expected_returncode: "{{ del_status_code }}" tasks: - - include: ../../checks/check-url-returncode.yaml + - ansible.builtin.include_tasks: ../../checks/check-url-returncode.yaml