Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename stackhpc-openstack-tests #1456

Merged
merged 4 commits into from
Jan 23, 2025
Merged
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
22 changes: 11 additions & 11 deletions .github/workflows/stackhpc-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,17 +453,17 @@ jobs:
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

- name: StackHPC OpenStack tests
id: stackhpc-openstack-tests
- name: StackHPC Cloud tests
id: stackhpc-cloud-tests
continue-on-error: true
run: |
mkdir -p sot-results
mkdir -p sct-results
docker run -t --rm \
-v $(pwd):/stack/kayobe-automation-env/src/kayobe-config \
-v $(pwd)/sot-results:/stack/sot-results \
-v $(pwd)/sct-results:/stack/sct-results \
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
$KAYOBE_IMAGE \
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/stackhpc-openstack-tests.yml' -e sot_version=${{ inputs.stackhpc_cloud_tests_version }}
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/playbook-run.sh '$KAYOBE_CONFIG_PATH/ansible/stackhpc-cloud-tests.yml' -e sot_version=${{ inputs.stackhpc_cloud_tests_version }}
env:
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}

Expand All @@ -488,19 +488,19 @@ jobs:
path: |
diagnostics/
tempest-artifacts/
sot-results/
if: ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-openstack-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}
sct-results/
if: ${{ !cancelled() && (steps.tempest.outcome == 'success' || steps.stackhpc-cloud-tests.outcome == 'success' || steps.diagnostics.outcome == 'success') }}

- name: Fail if any Tempest tests failed
run: |
test $(wc -l < tempest-artifacts/failed-tests) -lt 1

- name: Fail if any StackHPC OpenStack tests failed
- name: Fail if any StackHPC Cloud tests failed
run: |
echo "Some StackHPC OpenStack tests failed."
echo "See HTML results artifact (sot-results) for details."
echo "Some StackHPC Cloud tests failed."
echo "See HTML results artifact (sct-results) for details."
exit 1
if: steps.stackhpc-openstack-tests.outcome == 'failure'
if: steps.stackhpc-cloud-tests.outcome == 'failure'

- name: Destroy
run: terraform destroy -auto-approve
Expand Down
12 changes: 6 additions & 6 deletions doc/source/contributor/testing-ci-automation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ The workflow performs the following high-level steps:
subnets, routers, etc.).
#. If this is an upgrade job, upgrade the cloud under test to the target
release.
#. Run Tempest and `StackHPC OpenStack Tests
<https://github.com/stackhpc/stackhpc-openstack-tests>`_ to test the cloud.
#. Run Tempest and `StackHPC Cloud Tests
<https://github.com/stackhpc/stackhpc-cloud-tests>`_ to test the cloud.
#. Collect diagnostic information.
#. Upload results as an artifact.
#. Destroy the VM using Terraform.
Expand Down Expand Up @@ -345,12 +345,12 @@ The workflow performs the following high-level steps:
previous OpenStack release is deployed.
#. Register test resources in the cloud under test (images, flavors, networks,
subnets, routers, etc.).
#. Run Tempest and `StackHPC OpenStack Tests
<https://github.com/stackhpc/stackhpc-openstack-tests>`__ to test the cloud.
#. Run Tempest and `StackHPC Cloud Tests
<https://github.com/stackhpc/stackhpc-cloud-tests>`__ to test the cloud.
#. If this is an upgrade job, upgrade the cloud under test to the target
release.
#. Run Tempest and `StackHPC OpenStack Tests
<https://github.com/stackhpc/stackhpc-openstack-tests>`__ to test the cloud.
#. Run Tempest and `StackHPC Cloud Tests
<https://github.com/stackhpc/stackhpc-cloud-tests>`__ to test the cloud.
#. Collect diagnostic information.
#. Upload results as an artifact.
#. Destroy the VMs using Terraform.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
---
- name: Run StackHPC OpenStack tests
- name: Run StackHPC Cloud tests
hosts: tempest_runner
tags:
- stackhpc-openstack-tests
- stackhpc-cloud-tests
vars:
sot_venv: "{{ virtualenv_path }}/sot-venv"
sot_repo: https://github.com/stackhpc/stackhpc-cloud-tests
sot_version: main
sot_timeout: 30
results_path_local: "{{ lookup('env', 'HOME') }}/sot-results"
sct_venv: "{{ virtualenv_path }}/sct-venv"
sct_repo: https://github.com/stackhpc/stackhpc-cloud-tests
sct_version: main
sct_timeout: 30
results_path_local: "{{ lookup('env', 'HOME') }}/sct-results"
tasks:
- name: Stackhpc OpenStack tests
- name: Stackhpc Cloud tests
block:
- name: Create a temporary directory for tests repo
ansible.builtin.tempfile:
state: directory
suffix: sot-repo
suffix: sct-repo
register: repo_tmpdir

- name: Create a temporary directory for results
ansible.builtin.tempfile:
state: directory
suffix: sot-results
suffix: sct-results
register: results_tmpdir

- name: Clone the StackHPC OpenStack tests repository
- name: Clone the StackHPC Cloud tests repository
ansible.builtin.git:
repo: "{{ sot_repo }}"
version: "{{ sot_version }}"
repo: "{{ sct_repo }}"
version: "{{ sct_version }}"
dest: "{{ repo_tmpdir.path }}"
depth: 1
single_branch: true
Expand All @@ -36,7 +36,7 @@
ansible.builtin.pip:
name: "{{ item.name }}"
state: latest
virtualenv: "{{ sot_venv }}"
virtualenv: "{{ sct_venv }}"
virtualenv_command: python3 -m venv
with_items:
- { name: pip }
Expand All @@ -48,48 +48,48 @@
- "{{ repo_tmpdir.path }}"
- pytest-html
- pytest-timeout
virtualenv: "{{ sot_venv }}"
virtualenv: "{{ sct_venv }}"

- name: Ensure Python requirements file packages are installed
ansible.builtin.pip:
requirements: "{{ repo_tmpdir.path }}/requirements.txt"
virtualenv: "{{ sot_venv }}"
virtualenv: "{{ sct_venv }}"

- name: Include Kolla Ansible passwords
ansible.builtin.include_vars:
file: "{{ kayobe_env_config_path }}/kolla/passwords.yml"
name: kolla_passwords

- name: Run StackHPC OpenStack tests
- name: Run StackHPC Cloud tests
ansible.builtin.command:
cmd: >
{{ sot_venv }}/bin/py.test
--html={{ results_tmpdir.path }}/stackhpc-openstack-tests.html
{{ sct_venv }}/bin/py.test
--html={{ results_tmpdir.path }}/stackhpc-cloud-tests.html
--self-contained-html
--pyargs stackhpc_cloud_tests
--timeout {{ sot_timeout }}
--timeout {{ sct_timeout }}
-rfEx
-vv
environment:
OPENSEARCH_HOSTS: "{{ sot_opensearch_hosts }}"
OPENSEARCH_PORT: "{{ sot_opensearch_port }}"
OPENSEARCH_TLS: "{{ sot_opensearch_tls }}"
PROMETHEUS_URL: "{{ sot_prometheus_url }}"
PROMETHEUS_USERNAME: "{{ sot_prometheus_username }}"
PROMETHEUS_PASSWORD: "{{ sot_prometheus_password }}"
OPENSEARCH_HOSTS: "{{ sct_opensearch_hosts }}"
OPENSEARCH_PORT: "{{ sct_opensearch_port }}"
OPENSEARCH_TLS: "{{ sct_opensearch_tls }}"
PROMETHEUS_URL: "{{ sct_prometheus_url }}"
PROMETHEUS_USERNAME: "{{ sct_prometheus_username }}"
PROMETHEUS_PASSWORD: "{{ sct_prometheus_password }}"
vars:
kolla_external_scheme: "{{ 'https' if kolla_enable_tls_external | bool else 'http' }}"
kolla_internal_scheme: "{{ 'https' if kolla_enable_tls_internal | bool else 'http' }}"
sot_opensearch_hosts: "{{ kolla_internal_fqdn }}"
sot_opensearch_port: 9200
sot_opensearch_tls: false
sot_prometheus_url: "{{ kolla_internal_scheme }}://{{ kolla_internal_fqdn }}:9091"
sot_prometheus_username: admin
sot_prometheus_password: "{{ kolla_passwords.prometheus_password }}"
sct_opensearch_hosts: "{{ kolla_internal_fqdn }}"
sct_opensearch_port: 9200
sct_opensearch_tls: false
sct_prometheus_url: "{{ kolla_internal_scheme }}://{{ kolla_internal_fqdn }}:9091"
sct_prometheus_username: admin
sct_prometheus_password: "{{ kolla_passwords.prometheus_password }}"
always:
- name: Fetch results
ansible.builtin.fetch:
src: "{{ results_tmpdir.path }}/stackhpc-openstack-tests.html"
src: "{{ results_tmpdir.path }}/stackhpc-cloud-tests.html"
dest: "{{ results_path_local }}/"
flat: true

Expand Down
Loading