Collecting tempest files
This patch collect the tempest.conf, accounts.yaml and the tempest.log files. In order to make it work here's what had to be changed: * General refactor of the jobs * Devstack jobs, inherited from devstack, and these files are on logs/ since it's the only place we can specify files to be according zuul documentation. You could add a tempest directory in logs but we would have to overwrite a lot of code just for it, since we are inherit the tempest run playbook from tempest project. * Packstack jobs are inherited from packstack, and they have a different way to upload logs, and they don't run tempest, so we had to implement our own upload logs and overwrite the packstack one. Basically a copy and paste, plus the generation of tempest directory in /tmp/logs and copying the files to that directory. * Instead of use the copy module from ansible, we are using the command module doing a sudo cp file because the copy module was failing with file not found, even though the file was there. A bug was opened against ansible at https://github.com/ansible/ansible/issues/42198 * Removing local py35 job since we are inherit it from upstream already Task: 22669 Story: 2002785 Change-Id: I04b0700955325fac543fb8410da5099872e9c7db
This commit is contained in:
parent
d1107c9653
commit
44a6513e5f
100
.zuul.yaml
100
.zuul.yaml
@ -1,8 +1,6 @@
|
|||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- python-tempestconf-tox-py35:
|
|
||||||
voting: false
|
|
||||||
- python-tempestconf-tox-cover
|
- python-tempestconf-tox-cover
|
||||||
- python-tempestconf-tempest-devstack-admin
|
- python-tempestconf-tempest-devstack-admin
|
||||||
- python-tempestconf-tempest-devstack-demo
|
- python-tempestconf-tempest-devstack-demo
|
||||||
@ -17,11 +15,6 @@
|
|||||||
- python-tempestconf-tempest-packstack-demo
|
- python-tempestconf-tempest-packstack-demo
|
||||||
- tripleo-ci-centos-7-containers-multinode
|
- tripleo-ci-centos-7-containers-multinode
|
||||||
|
|
||||||
- job:
|
|
||||||
name: python-tempestconf-tox-py35
|
|
||||||
parent: openstack-tox-py35
|
|
||||||
description: Temporary local job which runs unit tests with py35
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: python-tempestconf-tox-cover
|
name: python-tempestconf-tox-cover
|
||||||
parent: openstack-tox
|
parent: openstack-tox
|
||||||
@ -34,10 +27,9 @@
|
|||||||
tox_envlist: cover
|
tox_envlist: cover
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: python-tempestconf-tempest-devstack-admin
|
name: python-tempestconf-devstack-base
|
||||||
parent: devstack
|
parent: devstack
|
||||||
description: |
|
description: Base job for python-tempestconf on a devstack environment
|
||||||
Tempest job for python-tempestconf on a devstack environment as the admin user.
|
|
||||||
required-projects:
|
required-projects:
|
||||||
- openstack/python-tempestconf
|
- openstack/python-tempestconf
|
||||||
- openstack/tempest
|
- openstack/tempest
|
||||||
@ -46,10 +38,11 @@
|
|||||||
- zuul: openstack/python-tempestconf
|
- zuul: openstack/python-tempestconf
|
||||||
- zuul: openstack/tempest
|
- zuul: openstack/tempest
|
||||||
- zuul: openstack-dev/devstack
|
- zuul: openstack-dev/devstack
|
||||||
run: playbooks/python-tempestconf-tempest-devstack.yaml
|
|
||||||
vars:
|
vars:
|
||||||
user: admin
|
zuul_copy_output:
|
||||||
cloud_user: devstack-admin
|
'{{ devstack_base_dir }}/tempest/tempest.log': 'logs'
|
||||||
|
'{{ devstack_base_dir }}/tempest/etc/tempest.conf': 'logs'
|
||||||
|
'/etc/openstack/accounts.yaml': 'logs'
|
||||||
irrelevant-files:
|
irrelevant-files:
|
||||||
- config_tempest/tests/.*$
|
- config_tempest/tests/.*$
|
||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
@ -57,80 +50,71 @@
|
|||||||
- ^.*\.rst$
|
- ^.*\.rst$
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: python-tempestconf-tempest-devstack-demo
|
name: python-tempestconf-packstack-base
|
||||||
parent: devstack
|
parent: packstack-allinone
|
||||||
description: |
|
description: Base job for python-tempestconf on packstack environment
|
||||||
Tempest job for python-tempestconf on a devstack environment as the demo user.
|
|
||||||
required-projects:
|
required-projects:
|
||||||
|
- openstack/packstack
|
||||||
- openstack/python-tempestconf
|
- openstack/python-tempestconf
|
||||||
- openstack/tempest
|
- openstack/tempest
|
||||||
- openstack-dev/devstack
|
- openstack-dev/devstack
|
||||||
|
post-run: playbooks/upload-logs.yaml
|
||||||
roles:
|
roles:
|
||||||
|
- zuul: openstack/packstack
|
||||||
- zuul: openstack/python-tempestconf
|
- zuul: openstack/python-tempestconf
|
||||||
- zuul: openstack/tempest
|
- zuul: openstack/tempest
|
||||||
- zuul: openstack-dev/devstack
|
- zuul: openstack-dev/devstack
|
||||||
|
vars:
|
||||||
|
scenario: scenario000
|
||||||
|
zuul_copy_output:
|
||||||
|
'/opt/stack/tempest/etc/tempest.conf': 'logs'
|
||||||
|
'/opt/stack/tempest/tempest.log': 'logs'
|
||||||
|
'/etc/openstack/accounts.yaml': 'logs'
|
||||||
|
irrelevant-files:
|
||||||
|
- config_tempest/tests/.*$
|
||||||
|
- ^doc/.*$
|
||||||
|
- ^releasenotes/.*$
|
||||||
|
- ^.*\.rst$
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: python-tempestconf-tempest-devstack-admin
|
||||||
|
parent: python-tempestconf-devstack-base
|
||||||
|
description: |
|
||||||
|
Tempest job for python-tempestconf on a devstack environment as the admin user.
|
||||||
|
run: playbooks/python-tempestconf-tempest-devstack.yaml
|
||||||
|
vars:
|
||||||
|
user: admin
|
||||||
|
cloud_user: devstack-admin
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: python-tempestconf-tempest-devstack-demo
|
||||||
|
parent: python-tempestconf-devstack-base
|
||||||
|
description: |
|
||||||
|
Tempest job for python-tempestconf on a devstack environment as the demo user.
|
||||||
run: playbooks/python-tempestconf-tempest-devstack.yaml
|
run: playbooks/python-tempestconf-tempest-devstack.yaml
|
||||||
vars:
|
vars:
|
||||||
user: demo
|
user: demo
|
||||||
cloud_user: devstack
|
cloud_user: devstack
|
||||||
test_demo: True
|
test_demo: True
|
||||||
cloud_admin: devstack-admin
|
cloud_admin: devstack-admin
|
||||||
irrelevant-files:
|
|
||||||
- config_tempest/tests/.*$
|
|
||||||
- ^doc/.*$
|
|
||||||
- ^releasenotes/.*$
|
|
||||||
- ^.*\.rst$
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: python-tempestconf-tempest-packstack-admin
|
name: python-tempestconf-tempest-packstack-admin
|
||||||
parent: packstack-allinone
|
parent: python-tempestconf-packstack-base
|
||||||
description: |
|
description: |
|
||||||
Tempest job for python-tempestconf on a packstack environment as the admin user.
|
Tempest job for python-tempestconf on a packstack environment as the admin user.
|
||||||
required-projects:
|
|
||||||
- openstack/packstack
|
|
||||||
- openstack/python-tempestconf
|
|
||||||
- openstack/tempest
|
|
||||||
- openstack-dev/devstack
|
|
||||||
timeout: 5400
|
|
||||||
roles:
|
|
||||||
- zuul: openstack/packstack
|
|
||||||
- zuul: openstack/python-tempestconf
|
|
||||||
- zuul: openstack/tempest
|
|
||||||
- zuul: openstack-dev/devstack
|
|
||||||
run: playbooks/python-tempestconf-tempest-packstack.yaml
|
run: playbooks/python-tempestconf-tempest-packstack.yaml
|
||||||
vars:
|
vars:
|
||||||
scenario: scenario000
|
|
||||||
user: admin
|
user: admin
|
||||||
irrelevant-files:
|
|
||||||
- config_tempest/tests/.*$
|
|
||||||
- ^doc/.*$
|
|
||||||
- ^releasenotes/.*$
|
|
||||||
- ^.*\.rst$
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: python-tempestconf-tempest-packstack-demo
|
name: python-tempestconf-tempest-packstack-demo
|
||||||
parent: packstack-allinone
|
parent: python-tempestconf-packstack-base
|
||||||
description: |
|
description: |
|
||||||
Tempest job for python-tempestconf on a packstack environment as the demo user.
|
Tempest job for python-tempestconf on a packstack environment as the demo user.
|
||||||
required-projects:
|
|
||||||
- openstack/packstack
|
|
||||||
- openstack/python-tempestconf
|
|
||||||
- openstack/tempest
|
|
||||||
- openstack-dev/devstack
|
|
||||||
timeout: 5400
|
|
||||||
roles:
|
|
||||||
- zuul: openstack/packstack
|
|
||||||
- zuul: openstack/python-tempestconf
|
|
||||||
- zuul: openstack/tempest
|
|
||||||
- zuul: openstack-dev/devstack
|
|
||||||
run: playbooks/python-tempestconf-tempest-packstack.yaml
|
run: playbooks/python-tempestconf-tempest-packstack.yaml
|
||||||
vars:
|
vars:
|
||||||
scenario: scenario000
|
|
||||||
user: demo
|
user: demo
|
||||||
test_demo: True
|
test_demo: True
|
||||||
cloud_admin: packstack-admin
|
cloud_admin: packstack-admin
|
||||||
irrelevant-files:
|
|
||||||
- config_tempest/tests/.*$
|
|
||||||
- ^doc/.*$
|
|
||||||
- ^releasenotes/.*$
|
|
||||||
- ^.*\.rst$
|
|
||||||
|
30
playbooks/upload-logs.yaml
Normal file
30
playbooks/upload-logs.yaml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: Create tempest directory in /tmp/logs
|
||||||
|
file:
|
||||||
|
path: /tmp/logs/tempest
|
||||||
|
state: directory
|
||||||
|
become: True
|
||||||
|
|
||||||
|
# Using command instead of copy due
|
||||||
|
# https://github.com/ansible/ansible/issues/42198
|
||||||
|
- name: Copying tempest logs and config to /tmp/logs/tempest
|
||||||
|
command: "sudo cp {{ item }} /tmp/logs/tempest"
|
||||||
|
with_items:
|
||||||
|
- /opt/stack/tempest/etc/tempest.conf
|
||||||
|
- /opt/stack/tempest/tempest.log
|
||||||
|
- /etc/openstack/accounts.yaml
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
|
- name: Upload logs
|
||||||
|
synchronize:
|
||||||
|
src: '/tmp/logs'
|
||||||
|
dest: '{{ zuul.executor.log_root }}'
|
||||||
|
mode: pull
|
||||||
|
copy_links: true
|
||||||
|
verify_host: true
|
||||||
|
rsync_opts:
|
||||||
|
- --include=/logs/**
|
||||||
|
- --include=*/
|
||||||
|
- --exclude=*
|
||||||
|
- --prune-empty-dirs
|
@ -50,12 +50,6 @@
|
|||||||
chdir: "{{ tempestconf_src_relative_path }}"
|
chdir: "{{ tempestconf_src_relative_path }}"
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
|
||||||
- name: Print generated tempest.conf
|
|
||||||
shell: |
|
|
||||||
set -x
|
|
||||||
ls /opt/stack/tempest/etc
|
|
||||||
cat {{ tempestconf_src_relative_path }}/etc/tempest.conf
|
|
||||||
|
|
||||||
# tempest role which will run tests has tempest in {{ devstack_base_dir }}
|
# tempest role which will run tests has tempest in {{ devstack_base_dir }}
|
||||||
# location, therefore the file is copied there
|
# location, therefore the file is copied there
|
||||||
- name: Copy tempest.conf to the tempest directory
|
- name: Copy tempest.conf to the tempest directory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user