From efd86ed2c7b8ff308628d5c6e83a7eeab18ff442 Mon Sep 17 00:00:00 2001 From: Aric Gardner Date: Tue, 14 May 2019 16:16:07 -0400 Subject: [PATCH] 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 --- jjb/lf-info-vote.yaml | 3 --- shell/check-info-votes.sh | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) 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 -- 2.16.6