Chore: Upgrade Jenkins-job-builder to 6.3.0
[releng/global-jjb.git] / shell / gerrit-fetch-dependencies.sh
index 24542e9..c897f55 100644 (file)
@@ -25,21 +25,18 @@ set -eu -o pipefail
 
 REPOS_DIR="$WORKSPACE/.repos"
 
-IFS=" " read -r -a PATCHES <<< "$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep -E '(recheck:|reverify:)' | awk -F: '{print $2}')"
+IFS=" " read -r -a PATCHES <<< \
+        "$(echo "$GERRIT_EVENT_COMMENT_TEXT" | \
+            grep -E '(recheck:|reverify:)' | awk -F: '{print $2}')"
+
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+lf-activate-venv "git-review==1.28"
 
-# Workaround for git-review bug in v1.24
-# https://storyboard.openstack.org/#!/story/2001081
-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
-set -u
-# End git-review workaround
 
 projects=()
-for patch in $(echo "${PATCHES[@]}"); do
+for patch in "${PATCHES[@]}"; do
     json=$(curl -s "$GERRIT_URL/changes/$patch" | sed -e "s/)]}'//")
     project=$(echo "$json" | jq -r '.project')
     branch=$(echo "$json" | jq -r '.branch')