X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fcheck-info-votes.sh;h=1e02a386edfe4c026244cac700f76c83a58844b2;hb=c39a78a2527e40fbf2d46204ea70468c96dd1c05;hp=892dd8994e0fb398344b6cbe5257c109a24791f8;hpb=fabebb6e6d86dd37fa0fe47cff429ca0fc1b3ef6;p=releng%2Fglobal-jjb.git diff --git a/shell/check-info-votes.sh b/shell/check-info-votes.sh index 892dd899..1e02a386 100644 --- a/shell/check-info-votes.sh +++ b/shell/check-info-votes.sh @@ -9,7 +9,7 @@ # http://www.eclipse.org/legal/epl-v10.html ############################################################################## echo "---> check-info-votes.sh" -set -xe -o pipefail +set -u unset ref=$(echo "$GERRIT_REFSPEC" | awk -F"/" '{ print $4 }') pip="pip3" @@ -34,7 +34,6 @@ $pip install --user lftools $pip install --user lftools[nexus] $pip install --user jsonschema -change="$(echo "$GERRIT_CHANGE_URL" | awk -F"/" '{print $NF}')" echo "Checking votes:" lftools infofile check-votes INFO.yaml "$GERRIT_URL" "$ref" > gerrit_comment.txt exit_status="$?" @@ -45,5 +44,7 @@ if [[ "$exit_status" -ne 0 ]]; then exit "$exit_status" else echo "Vote completed submitting review" - ssh -p "$GERRIT_PORT" "$JENKINS_SSH_CREDENTIAL"@"$GERRIT_HOST" gerrit review "$change" --submit + ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --verified 1 + sleep 5 + ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --submit fi