
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
70 lines
1.9 KiB
YAML
70 lines
1.9 KiB
YAML
- block:
|
|
- debug:
|
|
var: source_credentials_commands
|
|
|
|
- name: Create python-tempestconf venv with latest pip, setuptools and pbr
|
|
pip:
|
|
virtualenv: "{{ virtualenvs.tempestconf }}"
|
|
name: "{{ item }}"
|
|
state: latest
|
|
with_items:
|
|
- pip
|
|
- setuptools
|
|
- pbr
|
|
|
|
- name: Debug, list tempestconf dir
|
|
shell: |
|
|
set -ex
|
|
ls -all .
|
|
pwd
|
|
args:
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
|
|
- name: Install python-tempestconf
|
|
pip:
|
|
name: "."
|
|
virtualenv: "{{ virtualenvs.tempestconf }}"
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
|
|
- name: "Cat keystonerc_ file (only in packstack case)"
|
|
shell: |
|
|
set -ex
|
|
cat {{ ansible_user_dir }}/keystonerc_{{ user }}
|
|
ignore_errors: True
|
|
args:
|
|
executable: /bin/bash
|
|
|
|
- name: Generate tempest configuration script
|
|
template:
|
|
src: generate-tempestconf.sh.j2
|
|
dest: "{{ tempestconf_src_relative_path }}/generate-tempestconf.sh"
|
|
mode: 0744
|
|
|
|
- include: test-demo-user.yaml
|
|
when: test_demo_user
|
|
|
|
- name: Generate tempest configuration file
|
|
shell: |
|
|
./generate-tempestconf.sh
|
|
args:
|
|
chdir: "{{ tempestconf_src_relative_path }}"
|
|
executable: /bin/bash
|
|
|
|
# tempest role which will run tests has tempest in {{ devstack_base_dir }}
|
|
# location, therefore the file is copied there
|
|
- name: Copy tempest.conf to the tempest directory
|
|
shell: |
|
|
set -x
|
|
cp {{ tempestconf_src_relative_path }}/etc/tempest.conf {{ devstack_base_dir }}/tempest/etc/tempest.conf
|
|
when: output_path is not defined
|
|
|
|
- name: Copy tempest.conf to the specified location
|
|
become: yes
|
|
shell: |
|
|
set -x
|
|
cp {{ tempestconf_src_relative_path }}/etc/tempest.conf {{ output_path }}
|
|
when: output_path is defined
|
|
|
|
vars:
|
|
tempestconf_src_relative_path: "{{ zuul.projects['git.openstack.org/openstack/python-tempestconf'].src_dir }}"
|