Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion reproducer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
dest: "zuul@controller-0:{{ sync_dir }}"
archive: true
recursive: true
ignore_errors: true

# NOTE(dpawlik): After calling reproducer role using ZIronic tool,
# when the bootstrap phase has been completed, it generates a file
Expand All @@ -143,9 +144,24 @@
ansible.builtin.command:
cmd: "$HOME/deploy-architecture.sh {{ cifmw_deploy_architecture_args | default('') }}"

- name: Ensure ci-framework-data logs are writable on controller-0
when:
- cifmw_run_post_deployment | default(false) | bool
- not cifmw_deploy_reproducer_env | default(true) | bool
delegate_to: controller-0
become: true
ansible.builtin.shell:
cmd: >-
chown -R zuul:zuul {{ ansible_user_dir }}/ci-framework-data/logs &&
chmod -R u+rwX {{ ansible_user_dir }}/ci-framework-data/logs
changed_when: false
ignore_errors: true

- name: Run post deployment if instructed to
when:
- cifmw_deploy_architecture | default(false) | bool
- >-
(cifmw_deploy_architecture | default(false) | bool) or
(cifmw_run_post_deployment | default(false) | bool)
- cifmw_post_deployment | default(true) | bool
no_log: "{{ cifmw_nolog | default(true) | bool }}"
async: "{{ 7200 + cifmw_test_operator_timeout | default(3600) }}" # 2h should be enough to deploy EDPM and rest for tests.
Expand Down
29 changes: 28 additions & 1 deletion roles/test_operator/tasks/run-test-operator-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,37 @@
ignore_errors: true
register: testpod

- name: Wait for all workflow pods to reach terminal state - {{ run_test_fw }}
when:
- test_operator_workflow | length > 1
kubernetes.core.k8s_info:
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
api_key: "{{ cifmw_openshift_token | default(omit) }}"
context: "{{ cifmw_openshift_context | default(omit) }}"
namespace: "{{ stage_vars_dict.cifmw_test_operator_namespace }}"
kind: Pod
label_selectors:
- "instanceName={{ test_operator_instance_name }}"
retries: "{{ (cifmw_test_operator_timeout / 10) | round | int }}"
delay: 10
until: >
_all_wf_pods.resources | length > 0 and
_all_wf_pods.resources |
map(attribute='status.phase') |
reject('in', ['Succeeded', 'Failed']) |
list | length == 0
ignore_errors: true
register: _all_wf_pods

- name: Check whether timed out - {{ run_test_fw }}
vars:
_last_step_timed_out: >-
{{ testpod.attempts == (cifmw_test_operator_timeout / 10) | round | int }}
_all_wf_timed_out: >-
{{ (_all_wf_pods.attempts | default(0)) == (cifmw_test_operator_timeout / 10) | round | int }}
ansible.builtin.set_fact:
testpod_timed_out: >-
{{ testpod.attempts == (cifmw_test_operator_timeout / 10) | round | int }}
{{ _last_step_timed_out or _all_wf_timed_out }}

- name: Collect logs
when:
Expand Down
Loading