Collect logs from testing

It is helpful to collect logs / config files after testing.

Change-Id: Ide854f94a5057c754ebbc4a0dac24b5f8b6e91d6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-02-04 18:48:48 -05:00
parent 9a2dd06832
commit 5bde958d2f
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
2 changed files with 17 additions and 0 deletions

View File

@ -1,6 +1,7 @@
- job:
name: ansible-role-zuul
run: tests/test.yaml
post-run: tests/collect-logs.yaml
required-projects:
- name: openstack-infra/zuul
roles:

16
tests/collect-logs.yaml Normal file
View File

@ -0,0 +1,16 @@
- hosts: all
tasks:
- name: Ensure logs directory exists
file:
path: "{{ zuul.executor.log_root }}/logs"
state: directory
delegate_to: localhost
- name: Collect zuul log files
synchronize:
dest: "{{ zuul.executor.log_root }}/logs"
mode: pull
rsync_opts:
- "--relative"
src: /var/log/zuul
verify_host: true