zuul-jobs/roles/merge-output-to-logs/tasks/main.yaml
James E. Blair 5603eb2291 Revert "Refactor fetch-sphinx-tarball to be executor safe"
This reverts commit 51a8ed8e95.

This has a typo ("exector").  The fix is obvious, but the bigger
issue is that it was not caught in testing, even though the main
purpose of the change was to re-enable tests.  We should understand
why it wasn't caught in testing and resolve that before fixing and
unreverting.

Change-Id: I3ed407546fecc52d4a039f7959c0521511e6a00b
2020-10-14 13:54:22 -07:00

19 lines
681 B
YAML

- name: Move artifacts and docs to logs dir
when: zuul.change is defined
delegate_to: localhost
shell: |
if [ -n "$(find {{ zuul.executor.work_root }}/{{ zj_item }} -mindepth 1)" ] ; then
# Only create target directory if it is needed.
# Do not fail if it is already there.
mkdir -p {{ zuul.executor.log_root }}/{{ zj_item }}
# Leave the original directory behind so that other roles
# operating on the interface directories can simply no-op.
mv -f {{ zuul.executor.work_root }}/{{ zj_item }}/* {{ zuul.executor.log_root }}/{{ zj_item }}
fi
loop:
- artifacts
- docs
loop_control:
loop_var: zj_item
run_once: true