Skip to content

Commit 1337609

Browse files
authored
[ci] Copy results files immediately after running FVTs (#268)
If the tempest tests fail, the job ends. In order to make sure the FVT results are available, they need to be copied to their final destination before tempest tests are run. To do this, a bool was added to the ci/report_results.yml playbook, which disables reporting failures (the files get copied, but the results are not checked for failures, which would end the job if there were failures, therefor skipping tempest tests). The report_results is run again after the tempest tests, but this time the failures get reported.
1 parent f471f89 commit 1337609

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

ci/report_result.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
gather_facts: true
6060
vars_files:
6161
- vars/common.yml
62+
pre_tasks:
63+
- name: Stop play early if we do not want to check the failures
64+
when:
65+
- not (check_failures | default(true) | bool)
66+
ansible.builtin.meta: end_play
6267
tasks:
6368
- name: "Get the matching lines in the results files"
6469
ansible.builtin.command:

ci/vars-functional-test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ pre_tests_00_run_functional_test:
99
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/run_cloudops_tests_osp18.yml"
1010
type: playbook
1111
config_file: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/ansible.cfg"
12-
12+
pre_tests_01_copy_results:
13+
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/report_result.yml"
14+
type: playbook
15+
extra_vars:
16+
check_failures: false
1317
cifmw_run_tests: true
1418
# redefine this to clear the skipped test
1519
# this should be done in the parent job IF the openstack versions are updated

ci/vars-graphing-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ post_deploy_00_run_graphing_test:
33
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/run_graphing_test.yml"
44
config_file: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/ansible.cfg"
55
type: playbook
6+
post_deploy_01_copy_results:
7+
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/report_result.yml"
8+
type: playbook
9+
extra_vars:
10+
check_failures: false
611

712
cifmw_run_tests: true
813
# run only smoke tests

ci/vars-logging-test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ post_deploy_00_fvt_logging:
44
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/logging_tests_all.yml"
55
config_file: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/ansible.cfg"
66
type: playbook
7-
7+
post_deploy_01_copy_results:
8+
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/report_result.yml"
9+
type: playbook
10+
extra_vars:
11+
check_failures: false
812
cifmw_run_tests: true
913
# enable only the smoketests
1014
cifmw_test_operator_tempest_include_list: |

ci/vars-metric-verification-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ post_deploy_00_fvt_verify_metrics:
33
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/run_verify_metrics_osp18.yml"
44
type: playbook
55
config_file: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/ansible.cfg"
6+
post_deploy_01_copy_results:
7+
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/report_result.yml"
8+
type: playbook
9+
extra_vars:
10+
check_failures: false
11+
612
cifmw_run_tests: true
713
cifmw_test_operator_tempest_include_list: |
814
^tempest.*\[.*\bsmoke\b.*\]

0 commit comments

Comments
 (0)