Skip to content

Commit c728fa4

Browse files
committed
Rename stackhpc-openstack-tests
1 parent 4a55d94 commit c728fa4

File tree

4 files changed

+113
-12
lines changed

4 files changed

+113
-12
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ jobs:
439439
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
440440

441441
- name: StackHPC OpenStack tests
442-
id: stackhpc-openstack-tests
442+
id: stackhpc-cloud-tests
443443
continue-on-error: true
444444
run: |
445445
mkdir -p sot-results
@@ -448,7 +448,7 @@ jobs:
448448
-v $(pwd)/sot-results:/stack/sot-results \
449449
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
450450
$KAYOBE_IMAGE \
451-
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/stackhpc-openstack-tests.yml'
451+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/stackhpc-cloud-tests.yml'
452452
env:
453453
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
454454

@@ -474,7 +474,7 @@ jobs:
474474
diagnostics/
475475
tempest-artifacts/
476476
sot-results/
477-
if: ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-openstack-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
477+
if: ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-cloud-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
478478

479479
- name: Fail if any Tempest tests failed
480480
run: |
@@ -485,7 +485,7 @@ jobs:
485485
echo "Some StackHPC OpenStack tests failed."
486486
echo "See HTML results artifact (sot-results) for details."
487487
exit 1
488-
if: steps.stackhpc-openstack-tests.outcome == 'failure'
488+
if: steps.stackhpc-cloud-tests.outcome == 'failure'
489489

490490
- name: Destroy
491491
run: terraform destroy -auto-approve

doc/source/contributor/testing-ci-automation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The workflow performs the following high-level steps:
123123
#. If this is an upgrade job, upgrade the cloud under test to the target
124124
release.
125125
#. Run Tempest and `StackHPC OpenStack Tests
126-
<https://github.com/stackhpc/stackhpc-openstack-tests>`_ to test the cloud.
126+
<https://github.com/stackhpc/stackhpc-cloud-tests>`_ to test the cloud.
127127
#. Collect diagnostic information.
128128
#. Upload results as an artifact.
129129
#. Destroy the VM using Terraform.
@@ -346,11 +346,11 @@ The workflow performs the following high-level steps:
346346
#. Register test resources in the cloud under test (images, flavors, networks,
347347
subnets, routers, etc.).
348348
#. Run Tempest and `StackHPC OpenStack Tests
349-
<https://github.com/stackhpc/stackhpc-openstack-tests>`__ to test the cloud.
349+
<https://github.com/stackhpc/stackhpc-cloud-tests>`__ to test the cloud.
350350
#. If this is an upgrade job, upgrade the cloud under test to the target
351351
release.
352352
#. Run Tempest and `StackHPC OpenStack Tests
353-
<https://github.com/stackhpc/stackhpc-openstack-tests>`__ to test the cloud.
353+
<https://github.com/stackhpc/stackhpc-cloud-tests>`__ to test the cloud.
354354
#. Collect diagnostic information.
355355
#. Upload results as an artifact.
356356
#. Destroy the VMs using Terraform.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
- name: Run StackHPC OpenStack tests
3+
hosts: tempest_runner
4+
tags:
5+
- stackhpc-cloud-tests
6+
vars:
7+
sot_venv: "{{ virtualenv_path }}/sot-venv"
8+
sot_repo: https://github.com/stackhpc/stackhpc-cloud-tests
9+
sot_version: v0.0.1
10+
sot_timeout: 30
11+
results_path_local: "{{ lookup('env', 'HOME') }}/sot-results"
12+
tasks:
13+
- name: Stackhpc OpenStack tests
14+
block:
15+
- name: Create a temporary directory for tests repo
16+
ansible.builtin.tempfile:
17+
state: directory
18+
suffix: sot-repo
19+
register: repo_tmpdir
20+
21+
- name: Create a temporary directory for results
22+
ansible.builtin.tempfile:
23+
state: directory
24+
suffix: sot-results
25+
register: results_tmpdir
26+
27+
- name: Clone the StackHPC OpenStack tests repository
28+
ansible.builtin.git:
29+
repo: "{{ sot_repo }}"
30+
version: "{{ sot_version }}"
31+
dest: "{{ repo_tmpdir.path }}"
32+
depth: 1
33+
single_branch: true
34+
35+
- name: Ensure the latest versions of pip and setuptools are installed # noqa package-latest
36+
ansible.builtin.pip:
37+
name: "{{ item.name }}"
38+
state: latest
39+
virtualenv: "{{ sot_venv }}"
40+
virtualenv_command: python3 -m venv
41+
with_items:
42+
- { name: pip }
43+
- { name: setuptools }
44+
45+
- name: Ensure required individual Python packages are installed
46+
ansible.builtin.pip:
47+
name:
48+
- "{{ repo_tmpdir.path }}"
49+
- pytest-html
50+
- pytest-timeout
51+
virtualenv: "{{ sot_venv }}"
52+
53+
- name: Ensure Python requirements file packages are installed
54+
ansible.builtin.pip:
55+
requirements: "{{ repo_tmpdir.path }}/requirements.txt"
56+
virtualenv: "{{ sot_venv }}"
57+
58+
- name: Include Kolla Ansible passwords
59+
ansible.builtin.include_vars:
60+
file: "{{ kayobe_env_config_path }}/kolla/passwords.yml"
61+
name: kolla_passwords
62+
63+
- name: Run StackHPC OpenStack tests
64+
ansible.builtin.command:
65+
cmd: >
66+
{{ sot_venv }}/bin/py.test
67+
--html={{ results_tmpdir.path }}/stackhpc-cloud-tests.html
68+
--self-contained-html
69+
--pyargs stackhpc_cloud_tests
70+
--timeout {{ sot_timeout }}
71+
-vv
72+
environment:
73+
OPENSEARCH_HOSTS: "{{ sot_opensearch_hosts }}"
74+
OPENSEARCH_PORT: "{{ sot_opensearch_port }}"
75+
OPENSEARCH_TLS: "{{ sot_opensearch_tls }}"
76+
PROMETHEUS_URL: "{{ sot_prometheus_url }}"
77+
PROMETHEUS_USERNAME: "{{ sot_prometheus_username }}"
78+
PROMETHEUS_PASSWORD: "{{ sot_prometheus_password }}"
79+
vars:
80+
kolla_external_scheme: "{{ 'https' if kolla_enable_tls_external | bool else 'http' }}"
81+
kolla_internal_scheme: "{{ 'https' if kolla_enable_tls_internal | bool else 'http' }}"
82+
sot_opensearch_hosts: "{{ kolla_internal_fqdn }}"
83+
sot_opensearch_port: 9200
84+
sot_opensearch_tls: false
85+
sot_prometheus_url: "{{ kolla_internal_scheme }}://{{ kolla_internal_fqdn }}:9091"
86+
sot_prometheus_username: admin
87+
sot_prometheus_password: "{{ kolla_passwords.prometheus_password }}"
88+
always:
89+
- name: Fetch results
90+
ansible.builtin.fetch:
91+
src: "{{ results_tmpdir.path }}/stackhpc-cloud-tests.html"
92+
dest: "{{ results_path_local }}/"
93+
flat: true
94+
95+
- name: Clean up temporary directory
96+
ansible.builtin.file:
97+
path: "{{ item }}"
98+
state: absent
99+
loop:
100+
- "{{ repo_tmpdir.path }}"
101+
- "{{ results_tmpdir.path }}"

etc/kayobe/ansible/stackhpc-openstack-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
- name: Run StackHPC OpenStack tests
33
hosts: tempest_runner
44
tags:
5-
- stackhpc-openstack-tests
5+
- stackhpc-cloud-tests
66
vars:
77
sot_venv: "{{ virtualenv_path }}/sot-venv"
8-
sot_repo: https://github.com/stackhpc/stackhpc-openstack-tests
8+
sot_repo: https://github.com/stackhpc/stackhpc-cloud-tests
99
sot_version: v0.0.1
1010
sot_timeout: 30
1111
results_path_local: "{{ lookup('env', 'HOME') }}/sot-results"
@@ -64,9 +64,9 @@
6464
ansible.builtin.command:
6565
cmd: >
6666
{{ sot_venv }}/bin/py.test
67-
--html={{ results_tmpdir.path }}/stackhpc-openstack-tests.html
67+
--html={{ results_tmpdir.path }}/stackhpc-cloud-tests.html
6868
--self-contained-html
69-
--pyargs stackhpc_openstack_tests
69+
--pyargs stackhpc_cloud_tests
7070
--timeout {{ sot_timeout }}
7171
-vv
7272
environment:
@@ -88,7 +88,7 @@
8888
always:
8989
- name: Fetch results
9090
ansible.builtin.fetch:
91-
src: "{{ results_tmpdir.path }}/stackhpc-openstack-tests.html"
91+
src: "{{ results_tmpdir.path }}/stackhpc-cloud-tests.html"
9292
dest: "{{ results_path_local }}/"
9393
flat: true
9494

0 commit comments

Comments
 (0)