puppet-openstack-integration/playbooks/copy-logs.yaml
yatinkarel e6f762f780 Collect logs in post when not collected in run phase
Noticed in https://review.opendev.org/780856 when
job times out logs are not collected.
Collected logs can be helpful for debugging the issue
for which job timed out.

Change-Id: I315447073294896b1af6b94db917a11a9dfee506
2021-03-17 18:53:41 +05:30

13 lines
374 B
YAML

- hosts: all
tasks:
- name: Collect logs if not already collected
shell:
cmd: |
set -ex
if [[ ! -d "${WORKSPACE}/logs/etc" ]]; then
./copy_logs.sh
fi
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace/puppet-openstack-integration'
environment: '{{ zuul | zuul_legacy_vars }}'