X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fcheck-info-votes.sh;h=69d0b4845141d1d0194f295bc74a72d28f623696;hb=04547fcca5cabd3d9ad24fced4a0cf268d789296;hp=32384be4ddcea18548ca8532b52973257688d1a8;hpb=3b12327f7116727b4c19a8465589869a6add032b;p=releng%2Fglobal-jjb.git diff --git a/shell/check-info-votes.sh b/shell/check-info-votes.sh index 32384be4..69d0b484 100644 --- a/shell/check-info-votes.sh +++ b/shell/check-info-votes.sh @@ -27,10 +27,10 @@ if [ -d "/opt/pyenv" ]; then export PYTHONPATH latest_version=$(pyenv versions \ - | sed s,*,,g \ - | awk '/[0-9]+/{ print $1 }' \ - | sort --version-sort \ - | awk '/./{line=$0} END{print line}') + | sed s,*,,g \ + | awk '/[0-9]+/{ print $1 }' \ + | sort --version-sort \ + | awk '/./{line=$0} END{print line}') pyenv local "$latest_version" export PYENV_VERSION="3.6.4" @@ -42,7 +42,8 @@ $pip install --user lftools[nexus] $pip install --user jsonschema echo "Checking votes:" -lftools infofile check-votes INFO.yaml "$GERRIT_URL" "$ref" > gerrit_comment.txt +lftools infofile check-votes INFO.yaml "$GERRIT_URL" \ + "$ref" > gerrit_comment.txt exit_status="$?" if [[ "$exit_status" -ne 0 ]]; then @@ -51,7 +52,9 @@ if [[ "$exit_status" -ne 0 ]]; then exit "$exit_status" else echo "Vote completed submitting review" - ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --verified 1 + 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 + ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review \ + "$GERRIT_PATCHSET_REVISION" --submit fi