From: Aric Gardner Date: Tue, 14 May 2019 20:16:07 +0000 (-0400) Subject: Fix info-vote job X-Git-Tag: v0.38.0~5^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F15675%2F8;p=releng%2Fglobal-jjb.git Fix info-vote job When majority voting checks out: info-vote job must verify, sleep for a second, and then submit based on GERRIT_PATCHSET_REVISION change compare type from REGEX to ANT for file trigger Replace comment-added with comment-added-event Also remove the depreciated CDRV and only have Code-Review Signed-off-by: Aric Gardner Change-Id: Ie9477b0e0b3cfc193469fe55bc59eecae72ef756 --- diff --git a/jjb/lf-info-vote.yaml b/jjb/lf-info-vote.yaml index 24c7c11e..6e5f4d0d 100644 --- a/jjb/lf-info-vote.yaml +++ b/jjb/lf-info-vote.yaml @@ -55,9 +55,6 @@ - comment-added-contains-event: comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(vote)$' - comment-added-event: - approval-category: 'CRVW' - approval-value: 2 - - comment-added: approval-category: 'Code-Review' approval-value: 2 diff --git a/shell/check-info-votes.sh b/shell/check-info-votes.sh index 72dec3b8..1e02a386 100644 --- a/shell/check-info-votes.sh +++ b/shell/check-info-votes.sh @@ -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" "$USER"@"$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