|
210 | 210 | stage_vars_dict | |
211 | 211 | combine({'cifmw_test_operator_tempest_workflow': no_resources_workflow}) |
212 | 212 | }} |
| 213 | +
|
| 214 | +- name: Build tempest timing data URL (no workflow) |
| 215 | + when: |
| 216 | + - not cifmw_test_operator_dry_run | bool |
| 217 | + - stage_vars_dict.cifmw_test_operator_tempest_timing_data_url is defined |
| 218 | + - stage_vars_dict.cifmw_test_operator_tempest_timing_data_url |
| 219 | + - stage_vars_dict.cifmw_test_operator_tempest_workflow | length == 0 |
| 220 | + block: |
| 221 | + - name: Set the full timing data url |
| 222 | + ansible.builtin.set_fact: |
| 223 | + final_timing_data_url: >- |
| 224 | + {{ |
| 225 | + stage_vars_dict.cifmw_test_operator_tempest_timing_data_url + |
| 226 | + test_operator_instance_name + '/stestr.tar.gz' |
| 227 | + }} |
| 228 | +
|
| 229 | + - name: Override the Tempest CR |
| 230 | + ansible.builtin.set_fact: |
| 231 | + test_operator_cr: >- |
| 232 | + {{ |
| 233 | + test_operator_cr | |
| 234 | + combine({'spec': {'timingDataUrl': final_timing_data_url}}, recursive=true) |
| 235 | + }} |
| 236 | + stage_vars_dict: >- |
| 237 | + {{ |
| 238 | + stage_vars_dict | |
| 239 | + combine({'cifmw_test_operator_tempest_timing_data_url': final_timing_data_url}) |
| 240 | + }} |
| 241 | +
|
| 242 | +
|
| 243 | +- name: Build tempest timing data URL (workflow) |
| 244 | + when: |
| 245 | + - not cifmw_test_operator_dry_run | bool |
| 246 | + - stage_vars_dict.cifmw_test_operator_tempest_workflow | length > 0 |
| 247 | + block: |
| 248 | + - name: Add the full timing data url to workflow steps |
| 249 | + when: |
| 250 | + - item.timingDataUrl is defined |
| 251 | + - stage_vars_dict.cifmw_test_operator_tempest_timing_data_url is defined |
| 252 | + vars: |
| 253 | + base_url: >- |
| 254 | + {{ |
| 255 | + item.timingDataUrl | default(stage_vars_dict.cifmw_test_operator_tempest_timing_data_url, true) |
| 256 | + }} |
| 257 | + final_timing_data_url: >- |
| 258 | + {{ |
| 259 | + base_url + test_operator_instance_name + '-s0' + |
| 260 | + (step_number | string) + '-' + item.stepName + '/stestr.tar.gz' |
| 261 | + }} |
| 262 | + _timing_data_url_workflow_step: >- |
| 263 | + {{ |
| 264 | + item | |
| 265 | + combine({'timingDataUrl': final_timing_data_url}, recursive=true) |
| 266 | + }} |
| 267 | + ansible.builtin.set_fact: |
| 268 | + timing_data_url_workflow: "{{ timing_data_url_workflow | default([]) + [_timing_data_url_workflow_step] }}" |
| 269 | + loop: "{{ stage_vars_dict.cifmw_test_operator_tempest_workflow | list }}" |
| 270 | + loop_control: |
| 271 | + index_var: step_number |
| 272 | + |
| 273 | + - name: Override the Tempest CR workflow |
| 274 | + when: timing_data_url_workflow is defined |
| 275 | + ansible.builtin.set_fact: |
| 276 | + test_operator_cr: >- |
| 277 | + {{ |
| 278 | + test_operator_cr | |
| 279 | + combine({'spec': {'workflow': timing_data_url_workflow}}, recursive=true) |
| 280 | + }} |
| 281 | + stage_vars_dict: >- |
| 282 | + {{ |
| 283 | + stage_vars_dict | |
| 284 | + combine({'cifmw_test_operator_tempest_workflow': timing_data_url_workflow}) |
| 285 | + }} |
0 commit comments