diff --git a/playbooks/copy-logs.yaml b/playbooks/copy-logs.yaml new file mode 100644 index 000000000..157071697 --- /dev/null +++ b/playbooks/copy-logs.yaml @@ -0,0 +1,12 @@ +- 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 }}' diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 0dc1aa81a..860f915e8 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -55,7 +55,9 @@ abstract: true pre-run: playbooks/prepare-node-integration.yaml run: playbooks/run-integration-tests.yaml - post-run: playbooks/upload-logs.yaml + post-run: + - playbooks/copy-logs.yaml + - playbooks/upload-logs.yaml timeout: 7200 irrelevant-files: - ^.*\.md$