Allow check experimental jobs to gather logs
The experimental jobs would not have scripts/test-log-collect.sh in src/zuul.project.canonical_name, so we need to point to the appropriate folder. This is already done for the run job, so we are re-using the same mechanics. Change-Id: I26cc8c808fb34c426d5599e0023f9285c66cf1ed
This commit is contained in:
@@ -15,18 +15,30 @@
|
|||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
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
|
- name: Run log collection script
|
||||||
command: scripts/test-log-collect.sh
|
command: scripts/test-log-collect.sh
|
||||||
become: yes
|
become: yes
|
||||||
become_user: root
|
become_user: root
|
||||||
args:
|
args:
|
||||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
chdir: "src/{{ current_test_repo }}"
|
||||||
environment:
|
environment:
|
||||||
# ZUUL_PROJECT is used by the log collection functions to enable
|
# ZUUL_PROJECT is used by the log collection functions to enable
|
||||||
# log collection configuration specific to OpenStack CI
|
# log collection configuration specific to OpenStack CI
|
||||||
ZUUL_PROJECT: "{{ zuul.project.short_name }}"
|
ZUUL_PROJECT: "{{ zuul.project.short_name }}"
|
||||||
- name: Copy logs back to the executor
|
- name: Copy logs back to the executor
|
||||||
synchronize:
|
synchronize:
|
||||||
src: "src/{{ zuul.project.canonical_name }}/logs"
|
src: "src/{{ current_test_repo }}/logs"
|
||||||
dest: "{{ zuul.executor.log_root }}"
|
dest: "{{ zuul.executor.log_root }}"
|
||||||
mode: pull
|
mode: pull
|
||||||
|
Reference in New Issue
Block a user