openstack-zuul-jobs/playbooks/legacy/monasca-thresh-localrepo-upload/post.yaml
Monty Taylor e1e06136f0 Update legacy post playbooks to pull from primary
This should be a no-op for single-node jobs, but for multi-node jobs it
should keep them from trying to copy logs from all of their nodes,
which they are not designed to do.

Change-Id: Ibcf158f1b8082fbffeb48fa48c6592c87e056d01
2017-09-29 16:35:23 +00:00

22 lines
646 B
YAML

- hosts: primary
tasks:
- name: Ensure artifacts directory exists
file:
path: '{{ zuul.executor.work_root }}/artifacts'
state: directory
delegate_to: localhost
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.work_root }}/artifacts/$ZUUL_SHORT_PROJECT_NAME'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/target/$ZUUL_SHORT_PROJECT_NAME-*.jar
- --include=*/
- --exclude=*
- --prune-empty-dirs