Zuul: Simplify the integrated test playbooks
When using the integrated repo for testing, only the openstack-ansible repository can be used to kick off the tests - so if any other repo uses it, it will always be the same path. The existing implementation modeled from the openstack-ansible-tests repo which implemented a job and set of playbooks which would allow the tests to execute from any one of the other repositories - which is not the case here. There is therefore no reason to have this path be dynamic in any way, so we hard code it to where we know zuul has it. We also remove other unnecessary fact setting and ensure that bash is used when running gate-check-commit. Change-Id: I17780e48cac97b1f3888b8cb264c284d8ece44a1
This commit is contained in:
parent
ed3691fd05
commit
ab0b3abb75
@ -15,18 +15,6 @@
|
||||
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Set current test repo (cross-repo)
|
||||
set_fact:
|
||||
current_test_repo: "git.openstack.org/{{ osa_test_repo }}"
|
||||
when:
|
||||
- osa_test_repo is defined
|
||||
|
||||
- name: Set current test repo (non-cross-repo)
|
||||
set_fact:
|
||||
current_test_repo: "{{ zuul.project.canonical_name }}"
|
||||
when:
|
||||
- osa_test_repo is not defined
|
||||
|
||||
- name: Run log collection script
|
||||
shell: |
|
||||
source scripts/scripts-library.sh
|
||||
@ -34,18 +22,18 @@
|
||||
become: yes
|
||||
become_user: root
|
||||
args:
|
||||
chdir: "{{ ansible_user_dir }}/src/{{ current_test_repo }}"
|
||||
chdir: "src/git.openstack.org/openstack/openstack-ansible"
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
# ZUUL_PROJECT is used by the log collection functions to enable
|
||||
# log collection configuration specific to OpenStack CI
|
||||
ZUUL_PROJECT: "{{ zuul.project.short_name }}"
|
||||
TEST_EXIT_CODE: "{{ zuul_success | lower }}"
|
||||
GATE_LOG_DIR: "{{ ansible_user_dir }}/src/{{ current_test_repo }}/logs"
|
||||
GATE_LOG_DIR: "{{ ansible_user_dir }}/src/git.openstack.org/openstack/openstack-ansible/logs"
|
||||
|
||||
- name: Check whether a logs folder exists
|
||||
stat:
|
||||
path: "{{ ansible_user_dir }}/src/{{ current_test_repo }}/logs"
|
||||
path: "{{ ansible_user_dir }}/src/git.openstack.org/openstack/openstack-ansible/logs"
|
||||
get_attributes: no
|
||||
get_checksum: no
|
||||
get_md5: no
|
||||
@ -54,7 +42,7 @@
|
||||
|
||||
- name: Copy logs back to the executor
|
||||
synchronize:
|
||||
src: "{{ ansible_user_dir }}/src/{{ current_test_repo }}/logs"
|
||||
src: "{{ ansible_user_dir }}/src/git.openstack.org/openstack/openstack-ansible/logs"
|
||||
dest: "{{ zuul.executor.log_root }}/"
|
||||
mode: pull
|
||||
rsync_opts:
|
||||
|
@ -1,29 +1,15 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Set the Zuul sources path
|
||||
set_fact:
|
||||
zuul_src_path: "{{ ansible_user_dir }}/src"
|
||||
|
||||
- name: Set current test repo (cross-repo)
|
||||
set_fact:
|
||||
current_test_repo: "git.openstack.org/{{ osa_test_repo }}"
|
||||
when:
|
||||
- osa_test_repo is defined
|
||||
|
||||
- name: Set current test repo (non-cross-repo)
|
||||
set_fact:
|
||||
current_test_repo: "{{ zuul.project.canonical_name }}"
|
||||
when:
|
||||
- osa_test_repo is not defined
|
||||
|
||||
- name: Run gate-check-commit.sh script
|
||||
become: yes
|
||||
become_user: root
|
||||
command: "scripts/gate-check-commit.sh {{ scenario }} {{ action }} {{ install_method }}"
|
||||
shell: >-
|
||||
scripts/gate-check-commit.sh {{ scenario }} {{ action }} {{ install_method }}
|
||||
args:
|
||||
chdir: "src/{{ current_test_repo }}"
|
||||
chdir: "src/git.openstack.org/openstack/openstack-ansible"
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
# ZUUL_SRC_PATH is used by tests/get-ansible-role-requirements to
|
||||
# where the CI provided git sources were cloned.
|
||||
ZUUL_SRC_PATH: "{{ zuul_src_path }}"
|
||||
ZUUL_SRC_PATH: "{{ ansible_user_dir }}/src"
|
||||
ANSIBLE_PACKAGE: "{{ ansible_package | default('') }}"
|
||||
|
Loading…
Reference in New Issue
Block a user