From efdb68c9e45d1fa36d9b42b8d1ccbf1d83ec58d5 Mon Sep 17 00:00:00 2001 From: tusharjadhav3302 Date: Mon, 17 Aug 2026 15:45:02 +0530 Subject: [PATCH] Fail shiftstack testconfig when testing stages marked UNSTABLE After rsyncing shiftstackclient artifacts, fail when test_stage_unstable_flag is present so Zuul exits non-zero for test failures while the inner ocp_testing playbook can still complete stages. Use with ci-framework-jobs failure-message: unstable on monolithic shiftstack jobs for yellow UI on test regressions. Co-authored-by: Cursor --- roles/shiftstack/tasks/test_config.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/roles/shiftstack/tasks/test_config.yml b/roles/shiftstack/tasks/test_config.yml index 3ba77d2ed..30d2d88be 100644 --- a/roles/shiftstack/tasks/test_config.yml +++ b/roles/shiftstack/tasks/test_config.yml @@ -72,3 +72,26 @@ {{ cifmw_shiftstack_client_pod_name }}:{{ cifmw_shiftstack_shiftstackclient_artifacts_dir }}/ {{ testconfig_artifacts_dir }}/ failed_when: false + + - name: Check for UNSTABLE shiftstack testing stages flag in artifacts + ansible.builtin.stat: + path: "{{ testconfig_artifacts_dir }}/test_stage_unstable_flag" + register: _shiftstack_test_unstable_flag + + - name: Read UNSTABLE shiftstack testing stage messages from artifacts + ansible.builtin.set_fact: + _shiftstack_test_unstable_messages: >- + {{ lookup('ansible.builtin.file', testconfig_artifacts_dir + '/test_stage_unstable_flag') + | split('\n') + | map('trim') + | reject('equalto', '') + | list + | join('; ') }} + when: _shiftstack_test_unstable_flag.stat.exists + + - name: Fail when shiftstack testing stages were marked UNSTABLE + ansible.builtin.fail: + msg: >- + UNSTABLE: one or more shiftstack testing stages failed: + {{ _shiftstack_test_unstable_messages }} + when: _shiftstack_test_unstable_flag.stat.exists