Merge "Zuul: Simplify the integrated test playbooks"
This commit is contained in:
commit
e62606be91
@ -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