# Ensure we fail the job if any steps fail.
set -eu -o pipefail
-pip install --user --quiet --upgrade git-review
+# shellcheck disable=SC1090
+. ~/lf-env.sh
+
+lf-activate-venv --python python3 "git-review==2.3.1"
# Fail if branch cutting is not on master
if [ "$BRANCH_CUT" = "true" ] && [ "$BRANCH" != "master" ]; then
done
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 review -s