|
10 | 10 | # stackhpc_cloud_tests_version so this is only used if running "locally".
|
11 | 11 | sct_version: "main"
|
12 | 12 | # TODO: REMOVE THIS
|
13 |
| - sct_version_override: "docker-selinux" |
| 13 | + #sct_version_override: "docker-selinux" |
| 14 | + sct_version_override: "prometheus-alerts" |
14 | 15 | sct_timeout: 30
|
15 | 16 | results_path_local: "{{ lookup('env', 'HOME') }}/sct-results"
|
16 | 17 | tasks:
|
|
76 | 77 |
|
77 | 78 | # Monitoring tests should run once, executed on the host in the
|
78 | 79 | # tempest_runner group.
|
| 80 | + - name: Check for StackHPC Cloud monitoring tests |
| 81 | + ansible.builtin.stat: |
| 82 | + path: "{{ repo_tmpdir.path }}/stackhpc_cloud_tests/monitoring" |
| 83 | + register: stackhpc_cloud_monitoring_tests |
79 | 84 | - name: Run StackHPC Cloud monitoring tests
|
80 | 85 | ansible.builtin.command:
|
81 | 86 | cmd: >
|
|
118 | 123 | sct_prometheus_password: "{{ kolla_passwords.prometheus_password }}"
|
119 | 124 | failed_when: monitoring_results.rc not in [0, 1]
|
120 | 125 | register: monitoring_results
|
121 |
| - when: "'tempest_runner' in group_names" |
| 126 | + when: "'tempest_runner' in group_names and stackhpc_cloud_monitoring_tests.stat.exists" |
122 | 127 |
|
123 | 128 | # Host tests should run on every host in the overcloud group.
|
124 | 129 | # TODO: Use TestInfra's native Ansible or SSH connection plugins for
|
125 | 130 | # remote test execution? That would place all results in a single file
|
126 | 131 | # and allow us to execute all tests from a single host.
|
127 | 132 | # https://testinfra.readthedocs.io/en/latest/backends.html#connection-backends
|
| 133 | + - name: Check for StackHPC Cloud monitoring tests |
| 134 | + ansible.builtin.stat: |
| 135 | + path: "{{ repo_tmpdir.path }}/stackhpc_cloud_tests/host" |
| 136 | + register: stackhpc_cloud_host_tests |
128 | 137 | - name: Run StackHPC Cloud host tests
|
129 | 138 | ansible.builtin.command:
|
130 | 139 | cmd: >
|
|
147 | 156 | sct_selinux_state: "{{ selinux_state }}"
|
148 | 157 | failed_when: host_results.rc not in [0, 1]
|
149 | 158 | register: host_results
|
150 |
| - when: "'overcloud' in group_names" |
151 | 159 | # Some host checks may need to run as root
|
152 | 160 | become: true
|
| 161 | + when: "'overcloud' in group_names and stackhpc_cloud_host_tests.stat.exists" |
153 | 162 | # Host test results will be owned by root - we need to read and delete them
|
154 | 163 | - name: Change permissions on SCT host test results
|
155 | 164 | ansible.builtin.command:
|
156 | 165 | cmd: chmod 666 {{ results_tmpdir.path }}/host-{{ inventory_hostname }}.html
|
157 | 166 | become: true
|
| 167 | + when: "'overcloud' in group_names and stackhpc_cloud_host_tests.stat.exists" |
158 | 168 |
|
159 | 169 | always:
|
160 | 170 | - name: Synchronize results
|
|
0 commit comments