Fix ZUUL_REFNAME for translation jobs
Pass in the branch in upstream_translation for Zuul v3 and use it instead of ZUUL_REFNAME. Change-Id: Ib2f7aa49dec1ff906e1fef7e32bdbc4d3146e369
This commit is contained in:
parent
ec7d8347ba
commit
ccf36ea678
@ -17,12 +17,19 @@ JOBNAME=$2
|
||||
|
||||
# Replace /'s in branch names with -'s because Zanata doesn't
|
||||
# allow /'s in version names.
|
||||
ZANATA_VERSION=${ZUUL_REFNAME//\//-}
|
||||
# Zuul v3 native job passes the branch in as parameter but
|
||||
# does not set ZUUL_REFNAME.
|
||||
if [ -z "$ZUUL_REFNAME" ] ; then
|
||||
BRANCHNAME=$3
|
||||
else
|
||||
BRANCHNAME=$ZUUL_REFNAME
|
||||
fi
|
||||
ZANATA_VERSION=${BRANCHNAME//\//-}
|
||||
|
||||
SCRIPTSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $SCRIPTSDIR/common_translation_update.sh
|
||||
|
||||
init_branch $ZUUL_REFNAME
|
||||
init_branch $BRANCHNAME
|
||||
|
||||
# List of all modules to copy POT files from
|
||||
ALL_MODULES=""
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
tasks:
|
||||
- name: Run upstream_translation_update.sh script
|
||||
command: "{{ ansible_user_dir }}/scripts/upstream_translation_update.sh {{ zuul.project.short_name }} {{ zuul.job }}"
|
||||
command: "{{ ansible_user_dir }}/scripts/upstream_translation_update.sh {{ zuul.project.short_name }} {{ zuul.job }} {{zuul.branch}}"
|
||||
args:
|
||||
chdir: "src/{{ zuul.project.canonical_name }}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user