Skip to content

Commit fd93c31

Browse files
committed
[ci] Converge tests based on enabled features
1 parent e855781 commit fd93c31

File tree

5 files changed

+63
-3
lines changed

5 files changed

+63
-3
lines changed

.zuul.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling.yml"
1313
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-power-monitoring.yml"
1414
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling-tempest.yml"
15-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-functional-test.yml"
15+
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-fvt-tests.yml"
1616
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-use-master-containers.yml"
1717
roles:
1818
- zuul: github.com/openstack-k8s-operators/ci-framework
@@ -102,8 +102,7 @@
102102
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-power-monitoring.yml"
103103
# Use the tempest config we have for autoscaling tests
104104
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling-tempest.yml"
105-
# Currently, this runs tempest smoketests after the dashboards have been disabled again
106-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-graphing-test.yml"
105+
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-fvt-tests.yml"
107106
roles:
108107
- zuul: github.com/openstack-k8s-operators/ci-framework
109108
required-projects: *required_projects

ci/run_cloudops_tests_osp18.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@
88
vars_files:
99
- vars/common.yml
1010
- vars/osp18_env.yml
11+
pre_tasks:
12+
- name: "Get OpenStackControlPlane autoscaling status"
13+
ansible.builtin.command: >
14+
oc get oscp -n openstack -o jsonpath='{.items[0].spec.telemetry.template.autoscaling.enabled}'
15+
register: autoscaling_status
16+
changed_when: false
17+
18+
- name: "Set fact if autoscaling is enabled"
19+
ansible.builtin.set_fact:
20+
autoscaling_enabled: "{{ autoscaling_status.stdout | trim | lower == 'true' }}"
21+
22+
- name: "Notify if autoscaling test is skipped"
23+
ansible.builtin.debug:
24+
msg: "Skipping the autoscaling test because OpenStackControlPlane telemetry autoscaling is disabled."
25+
when: not autoscaling_enabled | bool
26+
27+
- name: "Skip autoscaling test if the autoscaling is disabled"
28+
ansible.builtin.meta: end_play
29+
when: not autoscaling_enabled | bool
1130
tasks:
1231
- block:
1332
- name: Include vars from the extra_vars files

ci/run_fvt_tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- name: Run Autoscaling test
2+
ansible.builtin.import_playbook: run_cloudops_tests_osp18.yml
3+
4+
- name: Run Graphing Console UI test
5+
ansible.builtin.import_playbook: run_graphing_test.yml

ci/run_graphing_test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@
77
PATH: "{{ cifmw_path }}"
88
vars_files:
99
- vars/common.yml
10+
pre_tasks:
11+
- name: "Get OpenStackControlPlane telemetry dashboardsEnabled status"
12+
ansible.builtin.command: >
13+
oc get oscp -n openstack -o jsonpath='{.items[0].spec.telemetry.template.metricStorage.dashboardsEnabled}'
14+
register: dashboard_status
15+
changed_when: false
16+
17+
- name: "Set fact if dashboards are enabled"
18+
ansible.builtin.set_fact:
19+
dashboards_enabled: "{{ dashboard_status.stdout | trim | lower == 'true' }}"
20+
21+
- name: "Notify if graphing test is skipped"
22+
ansible.builtin.debug:
23+
msg: "Skipping the graphing test because OpenStackControlPlane telemetry dashboards are disabled."
24+
when: not dashboards_enabled | bool
25+
26+
- name: "Skip graphing test if the dashboards is disabled"
27+
ansible.builtin.meta: end_play
28+
when: not dashboards_enabled | bool
1029
tasks:
1130
- block:
1231
- name: "Run Graphing Console UI tests"

ci/vars-fvt-tests.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
post_deploy_00_run_fvt_tests:
3+
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/run_fvt_tests.yml"
4+
config_file: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/ansible.cfg"
5+
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
11+
12+
cifmw_run_tests: true
13+
# run only smoke tests
14+
cifmw_test_operator_tempest_include_list: |
15+
^tempest.*\[.*\bsmoke\b.*\]
16+
post_tests_99_collect_results:
17+
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/report_result.yml"
18+
type: playbook

0 commit comments

Comments
 (0)