Run-v3: set log path only if zuul.change is defined

Now that the periodic jobs are using the same workflow, LOG_PATH cannot
be correctly formed since no zuul.change is defined in periodic
pipeline.
Adding the legacy role to set the log path and changing the bash env var
to use that value

Change-Id: I1dea572774a3f397aa82eefd92c0a8160b9c0a74
This commit is contained in:
Gabriele Cerami 2018-10-04 21:48:33 +01:00 committed by Ronelle Landy
parent 902b5f2666
commit 64768ad71f
1 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,10 @@
include_role:
name: configure-swap
- name: Set legacy log path
include_role:
name: set-zuul-log-path-fact
- name: Ensure legacy workspace directory
file:
path: '{{ workspace }}'
@ -105,7 +109,7 @@
# Compatibility with zuul v3 variables
export JOB_NAME={{ zuul.job }}
export LOG_PATH={{ zuul.change[-2:] }}/{{ zuul.change }}/{{ zuul.patchset }}/{{ zuul.pipeline }}/{{ zuul.job }}/{{ zuul.build[:7] }}
export LOG_PATH={{ zuul_log_path }}
export BRANCH_OVERRIDE="{{ branch_override | default('default') }}"
if [ "$BRANCH_OVERRIDE" != "default" ] ; then