diff --git a/jenkins/jobs/requirements.yaml b/jenkins/jobs/requirements.yaml index 1bcf5d78b0..16e695e53f 100644 --- a/jenkins/jobs/requirements.yaml +++ b/jenkins/jobs/requirements.yaml @@ -284,6 +284,7 @@ - branch-git-prep: branch: '{branch-override}' - shell: | + export ZUUL_REFNAME={branch-override} export ZUUL_REF={branch-override} /usr/local/jenkins/slave_scripts/propose_update.sh \ requirements-constraints diff --git a/jenkins/scripts/propose_update.sh b/jenkins/scripts/propose_update.sh index d69efa5585..3cad424c0f 100755 --- a/jenkins/scripts/propose_update.sh +++ b/jenkins/scripts/propose_update.sh @@ -64,8 +64,8 @@ fi USERNAME="proposal-bot" ALL_SUCCESS=0 -if [ -z "$ZUUL_REF" ] ; then - echo "No ZUUL_REF set, exiting." +if [ -z "$ZUUL_REFNAME" ] ; then + echo "No ZUUL_REFNAME set, exiting." exit 1 fi @@ -93,10 +93,10 @@ for PROJECT in $PROJECTS; do # check whether the project has this branch or a suitable fallback BRANCH="" - if git branch -a | grep -q "^ remotes/origin/$ZUUL_REF$" ; then - BRANCH=$ZUUL_REF - elif echo $ZUUL_REF | grep -q "^stable/" ; then - FALLBACK=$(echo $ZUUL_REF | sed s,^stable/,proposed/,) + if git branch -a | grep -q "^ remotes/origin/$ZUUL_REFNAME$" ; then + BRANCH=$ZUUL_REFNAME + elif echo $ZUUL_REFNAME | grep -q "^stable/" ; then + FALLBACK=$(echo $ZUUL_REFNAME | sed s,^stable/,proposed/,) if git branch -a | grep -q "^ remotes/origin/$FALLBACK$" ; then BRANCH=$FALLBACK fi