X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fautorelease%2Fbranch-cut.sh;h=c22f794c1fcb9ec465fdb870e3e41c8acddc75fb;hb=648dc88bbf67c37b650a8b57af491f6b9ccd9219;hp=90ab655bb02d38d6dd394579a89e82b6b2c5c1f6;hpb=a9483c29aee808fba80050214f106a323e8ee2eb;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/branch-cut.sh b/jjb/autorelease/branch-cut.sh index 90ab655bb..c22f794c1 100644 --- a/jjb/autorelease/branch-cut.sh +++ b/jjb/autorelease/branch-cut.sh @@ -28,12 +28,20 @@ LOG_FILE="$WORKSPACE/archives/branch-cut.log" set -eu -o pipefail +# shellcheck disable=SC1090 +. ~/lf-env.sh + +lf-activate-venv --python python3 "git-review==2.3.1" + # Validate inputs if [ -z "$RELEASE" ]; then echo "ERROR: RELEASE variable must be set to a release name. Eg Carbon" exit 1 fi +# Workaround for git-review failing to copy the commit-msg hook to submodules +git config core.hooksPath "$(git rev-parse --show-toplevel)/.git/hooks" + # Setup Gerrit remote to ensure Change-Id gets set on commit. git config --global --add gitreview.username "jenkins-$SILO" git remote -v @@ -65,7 +73,7 @@ if [ "$DRY_RUN" = false ] then echo "Pushing stable/${RELEASE,,} branches to Gerrit" git submodule foreach git push gerrit "stable/${RELEASE,,}" - git push gerrit "stable/$RELEASE" + git push gerrit "stable/${RELEASE,,}" fi # --- End create new maintenance branch