Fix info-vote job 75/15675/8
authorAric Gardner <agardner@linuxfoundation.org>
Tue, 14 May 2019 20:16:07 +0000 (16:16 -0400)
committerAric Gardner <agardner@linuxfoundation.org>
Wed, 15 May 2019 14:12:45 +0000 (10:12 -0400)
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 <agardner@linuxfoundation.org>
Change-Id: Ie9477b0e0b3cfc193469fe55bc59eecae72ef756

jjb/lf-info-vote.yaml
shell/check-info-votes.sh

index 24c7c11..6e5f4d0 100644 (file)
@@ -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
 
index 72dec3b..1e02a38 100644 (file)
@@ -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