Skip to content

Commit

Permalink
Get the operator bundle version for STO and SGO
Browse files Browse the repository at this point in the history
Inspect the provided bundles with opm render and
obtain the operator bundle version for each of them.
  • Loading branch information
vkmc committed Jul 8, 2024
1 parent 642df50 commit c1d9db3
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions build/stf-run-ci/tasks/create_catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,27 @@

- name: Create info variables from provided pre-built bundles (deploy from bundles)
when: __deploy_from_bundles_enabled | bool
ansible.builtin.set_fact:
sto_bundle_info:
'bundle_default_channel': "{{ stf_channel }}"
'bundle_channels': "{{ stf_channel }}"
'operator_bundle_version': "{{ sto_bundle_image_tag }}"
sgo_bundle_info:
'bundle_default_channel': "{{ stf_channel }}"
'bundle_channels': "{{ stf_channel }}"
'operator_bundle_version': "{{ sgo_bundle_image_tag }}"
block:
- name: Get STO bundle operator bundle version
ansible.builtin.shell:
cmd: "{{ base_dir }}/working/opm-{{ ocp_version }} render {{ __service_telemetry_bundle_image_path }} | jq .name | split('.', 1)"
register: sto_operator_bundle_version

- name: Get SGO bundle operator bundle version
ansible.builtin.shell:
cmd: "{{ base_dir }}/working/opm-{{ ocp_version }} render {{ __smart_gateway_bundle_image_path }} | jq .name | split('.', 1)"
register: sgo_operator_bundle_version

- name: Set info variables from provided pre-built bundles
ansible.builtin.set_fact:
sto_bundle_info:
'bundle_default_channel': "{{ stf_channel }}"
'bundle_channels': "{{ stf_channel }}"
'operator_bundle_version': "{{ sto_operator_bundle_version }}"
sgo_bundle_info:
'bundle_default_channel': "{{ stf_channel }}"
'bundle_channels': "{{ stf_channel }}"
'operator_bundle_version': "{{ sgo_operator_bundle_version }}"

- name: Show STO and SGO bundle info that will used in the index image
ansible.builtin.debug:
Expand Down

0 comments on commit c1d9db3

Please sign in to comment.