Skip to content

Commit

Permalink
Merge "Fix missing OCP component"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul CI authored and Gerrit Code Review committed Feb 11, 2025
2 parents ba82b45 + 2cd2483 commit 617935c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dci-openshift-app-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,14 @@

- name: Set facts also in jumphost host scope
ansible.builtin.set_fact:
job_info: "{{ job_info }}"
job_id: "{{ job_id }}"
dci_client_id: "{{ dci_client_id }}"
dci_api_secret: "{{ dci_api_secret }}"
dci_cs_url: "{{ dci_cs_url }}"
dci_ui_url: "{{ dci_ui_url }}"
pullsecret_tmp_file: "{{ pullsecret_tmp_file | default() }}"
ocp_component_id: "{{ ocp_component_id }}"
delegate_to: jumphost
delegate_facts: true

Expand Down
2 changes: 2 additions & 0 deletions plays/check_kubeconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
- "ocp_components.components|length >= 1"
- "'id' in ocp_components.components[0]"
delegate_to: localhost
delegate_facts: true
tags: [dci]

- name: Set ocp_component_id from version
Expand All @@ -165,6 +166,7 @@
- "ocp_components_by_version.components|length >= 1"
- "'id' in ocp_components_by_version.components[0]"
delegate_to: localhost
delegate_facts: true
tags: [dci]

- name: Display ocp_component_id
Expand Down
14 changes: 14 additions & 0 deletions plays/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,18 @@
ansible.builtin.include_role:
name: redhatci.ocp.preflight
when: preflight_operators_to_certify is defined

- name: Get final job info
dci_job:
id: "{{ job_id }}"
register: job_info_updated
delegate_to: localhost

- name: Test_ if the OCP component is present
assert:
success_msg: "{{ ocp_component_id }} is present"
fail_msg: "{{ ocp_component_id }} is absent"
that:
- (job_info_updated['job']['components'] | selectattr('id', 'equalto', ocp_component_id) | list | length) > 0
ignore_errors: true
...

0 comments on commit 617935c

Please sign in to comment.