Fix concurrency and syntax issue in merge-output-to-logs
In a multi-node job, these mv commands run in parallel which makes the second invocation weird and racy (even though there is a mv -f there) Put in run_once - we don't need to perform this more than one time, no matter how many nodes there are in the nodeset. Also, when there are actually files present, if ! $(ls work_dir/*) winds up expanding as a command to be run. Change-Id: Ia59c604d6639fab762fae5e53790da8992437587
This commit is contained in:
parent
c0a1ebb310
commit
f711df6978
@ -2,7 +2,7 @@
|
|||||||
when: zuul.change is defined
|
when: zuul.change is defined
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
shell: |
|
shell: |
|
||||||
if ! $(ls {{ zuul.executor.work_root }}/{{ item }}) ; then
|
if [ -n $(ls {{ zuul.executor.work_root }}/{{ item }}) ] ; then
|
||||||
# Only create target directory if it is needed.
|
# Only create target directory if it is needed.
|
||||||
# Do not fail if it is already there.
|
# Do not fail if it is already there.
|
||||||
mkdir -p {{ zuul.executor.log_root }}/{{ item }}
|
mkdir -p {{ zuul.executor.log_root }}/{{ item }}
|
||||||
@ -13,3 +13,4 @@
|
|||||||
loop:
|
loop:
|
||||||
- artifacts
|
- artifacts
|
||||||
- docs
|
- docs
|
||||||
|
run_once: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user