X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fgerrit-fetch-dependencies.sh;h=99a71f021ce637bf01a162ba3ca6b30494095df7;hb=f52936163e512a126befed7c091bcba94f9fc768;hp=830243fe14c2837de12e03a4e7e75bcc5a5d616d;hpb=9ace820ccb26638aad261697cb0a180e77af95e2;p=releng%2Fglobal-jjb.git diff --git a/shell/gerrit-fetch-dependencies.sh b/shell/gerrit-fetch-dependencies.sh index 830243fe..99a71f02 100644 --- a/shell/gerrit-fetch-dependencies.sh +++ b/shell/gerrit-fetch-dependencies.sh @@ -24,6 +24,17 @@ REPOS_DIR="$WORKSPACE/.repos" IFS=" " read -r -a PATCHES <<< "$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'recheck:' | 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 +pip install --quiet --upgrade git-review +set -u +# End git-review workaround + projects=() for patch in $(echo "${PATCHES[@]}"); do json=$(curl -s "$GERRIT_URL/changes/$patch" | sed -e "s/)]}'//") @@ -37,17 +48,6 @@ for patch in $(echo "${PATCHES[@]}"); do projects+=("$project") fi - # 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 - pip install --quiet --upgrade git-review - set -u - # End git-review workaround - pushd "$REPOS_DIR/$project" # If remote gerrit already exists just make sure path is expected if ! git remote add gerrit "$GERRIT_URL/$project" > /dev/null 2>&1; then