X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fgerrit-fetch-dependencies.sh;h=5cff012bc18264fea641ebfaae7f191cc8b63bc4;hb=refs%2Ftags%2Fv0.63.0;hp=24542e90b1a9bfe74d170366afba809488aefb75;hpb=bc5892ef503dc4039aa0aae4043e5c9b2cc9a363;p=releng%2Fglobal-jjb.git diff --git a/shell/gerrit-fetch-dependencies.sh b/shell/gerrit-fetch-dependencies.sh index 24542e90..5cff012b 100644 --- a/shell/gerrit-fetch-dependencies.sh +++ b/shell/gerrit-fetch-dependencies.sh @@ -27,19 +27,14 @@ REPOS_DIR="$WORKSPACE/.repos" IFS=" " read -r -a PATCHES <<< "$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep -E '(recheck:|reverify:)' | awk -F: '{print $2}')" -# 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 +# shellcheck disable=SC1090 +source ~/lf-env.sh + +lf-activate-venv "git-review==1.28" + 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')