The latest version of module trys to look for git hook
recursively within the submodules.
Error:
Entering 'global-jjb'
cannot stat '.git/hooks/commit-msg': Not a directory
fatal: run_command returned non-zero status for global-jjb
Remove workaround that has been resolved in v1.28 and use
lf-activate-venv to install git-review
Issue: RELENG-3435
Signed-off-by: Anil Belur <[email protected]>
Change-Id: I6839e2466174b3d27df21853bf960aa7c7711526
Signed-off-by: Anil Belur <[email protected]>
set -eu -o pipefail
-pip install --user --quiet --upgrade git-review
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+lf-activate-venv "git-review==1.28"
# Validate inputs
if [ -z "$RELEASE" ]; then
set -x
-pip install --user --quiet --upgrade git-review
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+lf-activate-venv "git-review==1.28"
RELEASE=${RELEASE:-$(echo "$GERRIT_EVENT_COMMENT_TEXT" | base64 -d | grep generate-release-notes | awk '{print $2}')}
if [ -z "$RELEASE" ]; then
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
-pip install --user --quiet --upgrade git-review
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+lf-activate-venv "git-review==1.28"
# Fail if branch cutting is not on master
if [ "$BRANCH_CUT" = "true" ] && [ "$BRANCH" != "master" ]; then
;;
esac
done
-set +u # Allow unbound variables for virtualenv
-virtualenv --quiet "/tmp/v/git-review"
-# shellcheck source=/tmp/v/git-review/bin/activate disable=SC1091
-source "/tmp/v/git-review/bin/activate"
-pip install --quiet --upgrade "pip==9.0.3" setuptools
-pip install --quiet --upgrade git-review
+
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+lf-activate-venv "git-review==1.28"
+
git config --global --add gitreview.username "jenkins-$SILO"
cd "$WORKSPACE"/autorelease || exit
GERRIT_PROJECT="releng/autorelease"