Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
- name: Mark the openshift tests as UNSTABLE
ansible.builtin.include_role:
name: tools_stage_results
tasks_from: mark_stage_unstable.yml
tasks_from: mark_test_stage_unstable.yml
vars:
unstable_msg: >-
The openshift test Suite failed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- name: Mark the CPMS {{ cpms_tests_type }} tests as UNSTABLE
ansible.builtin.include_role:
name: tools_stage_results
tasks_from: mark_stage_unstable.yml
tasks_from: mark_test_stage_unstable.yml
vars:
unstable_msg: >-
The {{ cpms_test_name }} {{ cpms_tests_type }} test suite failed.
Expand Down
2 changes: 1 addition & 1 deletion collection/stages/roles/csi_tests/tasks/run_csi_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- name: Mark the openshift tests as UNSTABLE
ansible.builtin.include_role:
name: tools_stage_results
tasks_from: mark_stage_unstable.yml
tasks_from: mark_test_stage_unstable.yml
vars:
unstable_msg: >-
The openshift test Suite failed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
- name: Mark the egressip tests as UNSTABLE
ansible.builtin.include_role:
name: tools_stage_results
tasks_from: mark_stage_unstable.yml
tasks_from: mark_test_stage_unstable.yml
vars:
unstable_msg: >-
The EgressIP test suite failed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
- name: Mark the openshift tests as UNSTABLE
ansible.builtin.include_role:
name: tools_stage_results
tasks_from: mark_stage_unstable.yml
tasks_from: mark_test_stage_unstable.yml
vars:
unstable_msg: >-
The openshift test Suite failed.
Expand Down
2 changes: 1 addition & 1 deletion collection/stages/roles/verification/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cinder_csi_project_name: cinder-test # project for testing cinder-csi sc provide
manila_project_name: manila-test # project for testing manila sc provider
demo_project_name: demo # project for testing demo app
verify_existing_namespace: false
soft_checks: true # run checks that won't stop the playbook but will generate the jenkins message to mark the run as unstable.
soft_checks: true # run checks that won't stop the playbook but will mark the run as UNSTABLE via stage_unstable_flag.
alerts_to_ignore:
# - 'Watchdog' # Should not be considered as severity is none
- 'NodeClockNotSynchronising'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: Set the test stage unstable var as true
ansible.builtin.set_fact:
test_stage_unstable: true
unstable_warning: "Warning! {{ unstable_msg }}"

- name: Print the test stage UNSTABLE message
ansible.builtin.debug:
msg: "{{ unstable_warning }}"

- name: Mark the test stage result as UNSTABLE
ansible.builtin.lineinfile:
path: "{{ test_stage_unstable_flag }}"
line: "{{ unstable_warning }}"
create: yes
mode: u=rw,g=rw,o=r
delegate_to: localhost
7 changes: 6 additions & 1 deletion configs/global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ report_dir: "{{ artifacts_dir }}/test_results"

# Sets the Ansible Controller Node machine's HOME environment variable
controller_home_dir: "{{ lookup('ansible.builtin.env', 'HOME') }}"
# The resources_file and stage_unstable_flag are in the Ansible control node's HOME environment variable
# The resources_file and stage_unstable flags are on the Ansible control node's HOME.
# test_stage_unstable_flag is written only by testing-stage rescues. The ci-framework
# shiftstack role fails the Zuul job when this file is present in rsynced artifacts;
# pair with failure-message: unstable on monolithic shiftstack Zuul jobs for yellow UI.
# stage_unstable_flag is used by soft verification/install workarounds (no end-of-run fail).
resources_file: "{{ controller_home_dir }}/artifacts/resources.yml"
stage_unstable_flag: "{{ controller_home_dir }}/artifacts/stage_unstable_flag"
test_stage_unstable_flag: "{{ controller_home_dir }}/artifacts/test_stage_unstable_flag"

admin_cloud: "default"
admin_env_file: "{{ osp_config_dir }}/{{ admin_cloud }}rc"
Expand Down
5 changes: 5 additions & 0 deletions playbooks/ocp_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
path: "{{ stage_unstable_flag }}"
state: absent

- name: Cleanup workspace flags - Remove the test_stage_unstable_flag if it exists
ansible.builtin.file:
path: "{{ test_stage_unstable_flag }}"
state: absent

- name: Update ocp_deployment_topology with overrides if defined
# Apply ocp_deployment_topology_override on top of the base topology
# The base configuration comes from `configs/global.yml`
Expand Down
Loading