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:
Jean-Philippe Evrard 2018-01-12 11:40:00 +00:00
parent a6575b4dd0
commit a9f5b9f84e

View File

@ -15,18 +15,30 @@
- 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
command: scripts/test-log-collect.sh
become: yes
become_user: root
args:
chdir: "src/{{ zuul.project.canonical_name }}"
chdir: "src/{{ current_test_repo }}"
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 }}"
- name: Copy logs back to the executor
synchronize:
src: "src/{{ zuul.project.canonical_name }}/logs"
src: "src/{{ current_test_repo }}/logs"
dest: "{{ zuul.executor.log_root }}"
mode: pull