|
23 | 23 | owner: "{{ ansible_user | default(lookup('env', 'USER')) }}" |
24 | 24 | group: "{{ ansible_user | default(lookup('env', 'USER')) }}" |
25 | 25 |
|
26 | | -- name: Set run_tempest and run_tobiko bool values |
27 | | - ansible.builtin.set_fact: |
28 | | - run_tempest: "{{ cifmw_run_tempest | default('true') | bool }}" |
29 | | - run_tobiko: "{{ cifmw_run_tobiko | default('false') | bool }}" |
30 | | - run_ansibletest: "{{ cifmw_run_ansibletest | default('false') | bool }}" |
31 | | - run_horizontest: "{{ cifmw_run_horizontest | default('false') | bool }}" |
32 | | - |
33 | 26 | - name: Ensure OperatorGroup for the test-operator is present |
34 | 27 | kubernetes.core.k8s: |
35 | 28 | kubeconfig: "{{ cifmw_openshift_kubeconfig }}" |
|
132 | 125 | until: csv.resources[0].status.phase | default(omit) == "Succeeded" |
133 | 126 | when: not cifmw_test_operator_dry_run | bool |
134 | 127 |
|
135 | | -- name: Run tempest job |
| 128 | +- name: Call test stages loop |
136 | 129 | vars: |
137 | | - run_test_fw: tempest |
138 | | - test_operator_config: "{{ cifmw_test_operator_tempest_config }}" |
139 | | - test_operator_job_name: "{{ cifmw_test_operator_tempest_name }}" |
140 | | - test_operator_kind_name: "{{ cifmw_test_operator_tempest_kind_name }}" |
141 | | - test_operator_crd_name: "{{ cifmw_test_operator_tempest_crd_name }}" |
142 | | - test_operator_workflow: "{{ cifmw_test_operator_tempest_workflow }}" |
143 | | - test_operator_config_playbook: tempest-tests.yml |
144 | | - ansible.builtin.include_tasks: run-test-operator-job.yml |
145 | | - when: run_tempest |
146 | | - |
147 | | -- name: Run ansibletest job |
148 | | - vars: |
149 | | - run_test_fw: ansibletest |
150 | | - test_operator_config: "{{ cifmw_test_operator_ansibletest_config }}" |
151 | | - test_operator_job_name: "{{ cifmw_test_operator_ansibletest_name }}" |
152 | | - test_operator_kind_name: "{{ cifmw_test_operator_ansibletest_kind_name }}" |
153 | | - test_operator_crd_name: "{{ cifmw_test_operator_ansibletest_crd_name }}" |
154 | | - test_operator_workflow: "{{ cifmw_test_operator_ansibletest_workflow }}" |
155 | | - ansible.builtin.include_tasks: run-test-operator-job.yml |
156 | | - when: run_ansibletest |
157 | | - |
158 | | -- name: Run horizontest job |
159 | | - vars: |
160 | | - run_test_fw: horizontest |
161 | | - test_operator_config: "{{ cifmw_test_operator_horizontest_config }}" |
162 | | - test_operator_job_name: "{{ cifmw_test_operator_horizontest_name }}" |
163 | | - test_operator_kind_name: "{{ cifmw_test_operator_horizontest_kind_name }}" |
164 | | - test_operator_crd_name: "{{ cifmw_test_operator_horizontest_crd_name }}" |
165 | | - test_operator_workflow: [] |
166 | | - ansible.builtin.include_tasks: run-test-operator-job.yml |
167 | | - when: run_horizontest |
168 | | - |
169 | | -# Since Tobiko may include disruptive tests (faults), it is better to execute it at the end |
170 | | -- name: Run tobiko job |
171 | | - vars: |
172 | | - run_test_fw: tobiko |
173 | | - test_operator_config: "{{ cifmw_test_operator_tobiko_config }}" |
174 | | - test_operator_job_name: "{{ cifmw_test_operator_tobiko_name }}" |
175 | | - test_operator_kind_name: "{{ cifmw_test_operator_tobiko_kind_name }}" |
176 | | - test_operator_crd_name: "{{ cifmw_test_operator_tobiko_crd_name }}" |
177 | | - test_operator_workflow: "{{ cifmw_test_operator_tobiko_workflow }}" |
178 | | - test_operator_config_playbook: tobiko-tests.yml |
179 | | - ansible.builtin.include_tasks: run-test-operator-job.yml |
180 | | - when: run_tobiko |
| 130 | + _stage_vars: "{{ item }}" |
| 131 | + ansible.builtin.include_tasks: stages.yml |
| 132 | + when: not cifmw_test_operator_dry_run | bool |
| 133 | + loop: "{{ cifmw_test_operator_stages }}" |
181 | 134 |
|
182 | 135 | - name: Delete all resources created by the role |
183 | 136 | ansible.builtin.include_tasks: cleanup.yml |
|
0 commit comments