Clark Boylan 9a8783fae3 Create dir needed to publish gerrit plugins
rsync will only create a single directory to copy contents in so we need
to create every dir level above that. In this case are copying to
$workdir/artifacts/plugins/$plugin and were only creating the artifacts
dir and rsync will only attempt to mkdir $plugin so this fails on
missing the plugins dir.

Fix this by also creating the plugins dir.

Change-Id: I93ecb3d39cc751bb7d4a17173fd02e41ea77b620
2017-10-26 09:31:18 -07:00

23 lines
699 B
YAML

- hosts: primary
tasks:
- name: Ensure artifacts directory exists
file:
path: '{{ zuul.executor.work_root }}/artifacts/plugins'
state: directory
recurse: yes
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/plugins/its-storyboard'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/gerrit/buck-out/gen/plugins/its-storyboard/its-storyboard-*.jar
- --include=*/
- --exclude=*
- --prune-empty-dirs