Skip to content

Commit 794cc44

Browse files
toskyopenshift-merge-bot[bot]
authored andcommitted
kuttl: fetch the locally built operators
Make sure that locally built operator (for example, thanks to the openstack-k8s-operators-content-provider job, or anything else which populates cifmw_operator_build_output) are used. This is a bit more complex than what EDPM jobs do (see the edpm_prepare role), where only the openstack-operator-index is overridden, likely because here there may be more operators being built.
1 parent 587205f commit 794cc44

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

ci/playbooks/kuttl/run-kuttl-tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,23 @@
33
ansible.builtin.include_vars:
44
dir: "{{ cifmw_basedir }}/artifacts/parameters"
55

6+
- name: Use the locally built operators if any
7+
ansible.builtin.set_fact:
8+
_local_operators_indexes:
9+
"{{ _local_operators_indexes|default({}) |
10+
combine({ item.key.split('-')[0]|upper+'_IMG':
11+
cifmw_operator_build_output['operators'][item.key].image_catalog}) }}"
12+
loop: "{{ cifmw_operator_build_output['operators'] | dict2items }}"
13+
when:
14+
- cifmw_operator_build_output is defined
15+
- "'operators' in cifmw_operator_build_output"
16+
617
- name: Set environment vars for kuttl test
718
ansible.builtin.set_fact:
819
cifmw_kuttl_tests_env: >-
920
{{
10-
cifmw_install_yamls_environment |
21+
_local_operators_indexes | default({}) |
22+
combine(cifmw_install_yamls_environment) |
1123
combine(cifmw_kuttl_tests_env_vars | default({})) |
1224
combine(cifmw_kuttl_openstack_prep_vars | default({})) |
1325
combine({'PATH': cifmw_path})

0 commit comments

Comments
 (0)