Merge "Fix info-vote job"
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Fri, 24 May 2019 17:24:29 +0000 (17:24 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Fri, 24 May 2019 17:24:29 +0000 (17:24 +0000)
jjb/lf-info-vote.yaml
shell/check-info-votes.sh

index 92763d3..1f6876f 100644 (file)
@@ -55,9 +55,6 @@
       - comment-added-contains-event:
           comment-contains-value: '^Patch Set\s+\d+:\s+vote\s*$'
       - 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