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
- 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
$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="$?"
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