Update gate jobs
ansible-role-refstack-client [1] has been created in order to make running refstack-client in automated jobs easier. The role does basically the same (and more) as the tempestconf-refstack-devstack.yaml playbook used in zuul jobs to gate changes within refstack-client repo. After devstack jobs were defined within the role repo by [2] we no longer need the playbook and the generate-tempestconf-refstack role. We can reuse the jobs [2] from ansible-role-refstack-client. The refstack-client-devstack-tempestconf job together with the playbook and the generate-tempestconf-refstack role can be removed as python-tempestconf was the only consumer of those, it got removed from there by the Depends-On patch. [1] https://opendev.org/x/ansible-role-refstack-client [2] https://review.opendev.org/c/x/ansible-role-refstack-client/+/765671 Depends-On: https://review.opendev.org/c/osf/python-tempestconf/+/766865 Change-Id: I618c8e59e67f0eed574671d5485bc11f7abec465
This commit is contained in:
64
.zuul.yaml
64
.zuul.yaml
@@ -1,62 +1,16 @@
|
||||
- project:
|
||||
templates:
|
||||
# Disable until fixed
|
||||
# - openstack-python-jobs
|
||||
# - openstack-python35-jobs
|
||||
- openstack-python36-jobs
|
||||
- openstack-python37-jobs
|
||||
- openstack-python3-wallaby-jobs
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-pep8
|
||||
- refstack-client-devstack-tempestconf
|
||||
- refstack-client-devstack-tempestconf-py3
|
||||
- refstack-client-devstack-master
|
||||
- refstack-client-devstack-victoria
|
||||
- refstack-client-devstack-ussuri
|
||||
- refstack-client-devstack-train
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-pep8
|
||||
- refstack-client-devstack-tempestconf
|
||||
- refstack-client-devstack-tempestconf-py3
|
||||
|
||||
- job:
|
||||
name: refstack-client-devstack-tempestconf-base
|
||||
parent: devstack
|
||||
description: |
|
||||
Refstack client job for testing python-tempestconf and RefStack Integration
|
||||
required-projects:
|
||||
- osf/refstack-client
|
||||
- openstack/tempest
|
||||
- openstack/devstack
|
||||
- osf/python-tempestconf
|
||||
roles:
|
||||
- zuul: osf/python-tempestconf
|
||||
- zuul: openstack/tempest
|
||||
- zuul: openstack/devstack
|
||||
- zuul: osf/refstack-client
|
||||
run: playbooks/tempestconf-refstack-devstack.yaml
|
||||
vars:
|
||||
user: demo
|
||||
cloud_user: devstack
|
||||
test_demo: true
|
||||
cloud_admin: devstack-admin
|
||||
irrelevant-files:
|
||||
- config_tempest/tests/.*$
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
- ^.*\.rst$
|
||||
|
||||
- job:
|
||||
name: refstack-client-devstack-tempestconf
|
||||
parent: refstack-client-devstack-tempestconf-base
|
||||
description: |
|
||||
Refstack client job for testing python-tempestconf and RefStack Integration
|
||||
using python2.
|
||||
|
||||
- job:
|
||||
name: refstack-client-devstack-tempestconf-py3
|
||||
parent: refstack-client-devstack-tempestconf-base
|
||||
description: |
|
||||
Refstack client job for testing python-tempestconf and RefStack Integration
|
||||
using python3.
|
||||
vars:
|
||||
python_3_args: -p 3
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: true
|
||||
- refstack-client-devstack-master
|
||||
- refstack-client-devstack-victoria
|
||||
- refstack-client-devstack-ussuri
|
||||
- refstack-client-devstack-train
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- run-devstack
|
||||
|
||||
- hosts: tempest
|
||||
vars:
|
||||
set_auth_url: "OS_AUTH_URL=$SERVICE_PROTOCOL://$SERVICE_HOST/identity/v3"
|
||||
devstack_base_dir: "/opt/stack"
|
||||
aditional_tempestconf_params: "auth.tempest_roles Member object-storage.operator_role Member"
|
||||
tasks:
|
||||
- name: Setup Tempest Run Directory
|
||||
include_role:
|
||||
name: setup-tempest-run-dir
|
||||
- name: Setup Tempest Data Directory
|
||||
include_role:
|
||||
name: setup-tempest-data-dir
|
||||
- name: ACL devstack files
|
||||
include_role:
|
||||
name: acl-devstack-files
|
||||
- name: Generate configuration file for Tempest as admin
|
||||
include_role:
|
||||
name: generate-tempestconf-file
|
||||
vars:
|
||||
output_path: "/etc/openstack/tempest_admin.conf"
|
||||
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc admin admin; {{ set_auth_url }}"
|
||||
user: admin
|
||||
- name: Generate accounts.yaml file for Demo
|
||||
include_role:
|
||||
name: generate-accounts-file
|
||||
vars:
|
||||
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc admin admin; {{ set_auth_url }}"
|
||||
accounts_file_destination: "/etc/openstack"
|
||||
tempest_config_file: "/etc/openstack/tempest_admin.conf"
|
||||
- name: Generate tempest.conf using refstack-client and run tempest tests
|
||||
include_role:
|
||||
name: generate-tempestconf-refstack
|
||||
vars:
|
||||
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}; {{ set_auth_url }}"
|
||||
user: demo
|
||||
@@ -1,3 +0,0 @@
|
||||
cloud_user: "devstack"
|
||||
virtualenvs:
|
||||
refstack_client: "~/.virtualenvs/.refstack_client"
|
||||
@@ -1,51 +0,0 @@
|
||||
- block:
|
||||
# python-tempestconf's source code is placed by zuul at the same level
|
||||
# as refstack-client's code, so when the task changes dir to
|
||||
# refstack-client's folder, python-tempestconf is located one folder above
|
||||
- name: Install refstack-client and python-tempestconf
|
||||
shell: |
|
||||
set -ex
|
||||
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
||||
./setup_env -c master -s ../python-tempestconf {{ python_3_args | default('') }}
|
||||
args:
|
||||
chdir: "{{ refstack_client_src_relative_path }}"
|
||||
executable: /bin/bash
|
||||
|
||||
- name: Print Tempest account file
|
||||
shell: |
|
||||
set -ex
|
||||
cat /etc/openstack/accounts.yaml
|
||||
|
||||
- name: Generate tempest configuration file
|
||||
shell: |
|
||||
set -ex
|
||||
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
||||
source .venv/bin/activate
|
||||
{{ source_credentials_commands }}
|
||||
printenv
|
||||
refstack-client config \
|
||||
--use-test-accounts /etc/openstack/accounts.yaml \
|
||||
--out /tmp/tempest.conf
|
||||
args:
|
||||
chdir: "{{ refstack_client_src_relative_path }}"
|
||||
executable: /bin/bash
|
||||
|
||||
- name: Print generated tempest.conf
|
||||
shell: |
|
||||
set -ex
|
||||
cat /tmp/tempest.conf
|
||||
|
||||
- name: Run refstack-client tests
|
||||
shell: |
|
||||
set -ex
|
||||
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
||||
source .venv/bin/activate
|
||||
printenv
|
||||
refstack-client test -c /tmp/tempest.conf \
|
||||
-v --test-list "https://refstack.openstack.org/api/v1/guidelines/2019.11/tests?target=platform&type=required&alias=true&flag=false"
|
||||
args:
|
||||
chdir: "{{ refstack_client_src_relative_path }}"
|
||||
executable: /bin/bash
|
||||
|
||||
vars:
|
||||
refstack_client_src_relative_path: "{{ zuul.projects['opendev.org/osf/refstack-client'].src_dir }}"
|
||||
Reference in New Issue
Block a user