
python-tempestconf-tempest-devstack-* jobs were failing due to missing virtualenv and tox. Added 'ensure-tox' role in packstack and devstack deployment playbook. To make sure that tox is installed and it will not break the tempest tests run. Change-Id: I554eb41b2e070d86c3d9f6e807a973f70d6b5f83 Signed-off-by: Amol Kahat <amolkahat@gmail.com>
73 lines
2.6 KiB
YAML
73 lines
2.6 KiB
YAML
- hosts: all
|
|
roles:
|
|
# the role is inherited from openstack/devstack project
|
|
- run-devstack
|
|
|
|
- hosts: tempest
|
|
vars:
|
|
# It's important that OS_AUTH_URL is in this format:
|
|
# <protocol>://<host>/identity/v3
|
|
# In some cases it can be only: <protocol>://<host>:5000
|
|
# https://github.com/openstack/devstack/blob/2c9343e5db44fa7a41ca6924737331dd9088ef8f/openrc#L87-L89
|
|
# (mkopec) That would end up with an HTTP MaxRetryError to <host>:5000,
|
|
# therefor OS_AUTH_URL is defined manually
|
|
set_auth_url: "OS_AUTH_URL=$SERVICE_PROTOCOL://$SERVICE_HOST/identity/v3"
|
|
devstack_base_dir: "/opt/stack"
|
|
test_demo_user: "{{ test_demo is defined }}"
|
|
tasks:
|
|
# setup-tempest-* and acl-devstack-files roles are inherited from
|
|
# openstack/tempest project
|
|
- name: Setup Tempest Run Directory
|
|
include_role:
|
|
name: setup-tempest-run-dir
|
|
- name: Setup Tempest Data Directory
|
|
include_role:
|
|
name: setup-tempest-data-dir
|
|
|
|
# NOTE: devstack jobs are failing on Run Tempest task
|
|
# it is because tox command is not found. Adding 'ensure-tox'
|
|
# role here to make sure that tox is installed and it
|
|
# will not break the tempest tests.
|
|
- name: Ensure tox is installed
|
|
include_role:
|
|
name: ensure-tox
|
|
vars:
|
|
ensure_global_symlinks: True
|
|
|
|
- name: ACL devstack files
|
|
include_role:
|
|
name: acl-devstack-files
|
|
- name: Edit clouds.yaml file
|
|
include_role:
|
|
name: tempestconf-workaround-auth-url
|
|
- name: Generate tempest configuration file
|
|
include_role:
|
|
name: generate-tempestconf-file
|
|
vars:
|
|
create_accounts_file: True
|
|
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}; {{ set_auth_url }}"
|
|
- name: Generate tempest configuration file based on cloud credentials
|
|
include_role:
|
|
name: generate-tempestconf-file-cloud
|
|
|
|
# run-tempest role is inherited from openstack/tempest project
|
|
- name: Run Tempest Tests
|
|
include_role:
|
|
name: run-tempest
|
|
when: plugins_paths is not defined
|
|
- block:
|
|
- name: Install tempest plugins
|
|
include_role:
|
|
name: install-plugins
|
|
- name: Setup Tempest Run Directory
|
|
include_role:
|
|
name: setup-tempest-run-dir
|
|
- name: Run Tempest Tests including plugins
|
|
include_role:
|
|
name: run-tempest
|
|
vars:
|
|
tox_envlist: "all"
|
|
tempest_test_regex: "{{ test_regex|join('|') }}"
|
|
tempest_black_regex: "{{ black_regex|join('|') }}"
|
|
when: plugins_paths is defined
|