From 19929aa259cba8d07f6309eb0fa05b9b1e715e5e Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Fri, 9 Feb 2018 17:37:33 -0500 Subject: [PATCH] Collect logs from testing It is helpful to have logs to debug failures. Change-Id: I3d5170713a031dc8ccb4772a7778bec1e63ffa15 Signed-off-by: Paul Belanger --- .zuul.yaml | 1 + tests/collect-logs.yaml | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/collect-logs.yaml diff --git a/.zuul.yaml b/.zuul.yaml index d8f95f7..f626b4c 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,6 +1,7 @@ - job: name: ansible-role-nodepool run: tests/test.yaml + post-run: tests/collect-logs.yaml required-projects: - name: openstack-infra/nodepool override-branch: feature/zuulv3 diff --git a/tests/collect-logs.yaml b/tests/collect-logs.yaml new file mode 100644 index 0000000..9014f1d --- /dev/null +++ b/tests/collect-logs.yaml @@ -0,0 +1,10 @@ +- hosts: all + tasks: + - name: Collect nodepool log files + synchronize: + dest: "{{ zuul.executor.log_root }}/logs" + mode: pull + rsync_opts: + - "--relative" + src: /var/log/nodepool + verify_host: true