gerrit trigger is not working in opnfv.
we had this happen to some of the read the docs jobs...
An updgrade of gerrit is planned to hopefully resolve this.
Not sure were to test to approval category stuff.
That said I think the mistake is that the value is an int.
approval-category: 'WHATEVER'
approval-value: 2
I dont actually want the script to exit on first error, need to output
the vote verdict.
not sure why I thought that JENKINS_SSH_CREDENTIAL
was the correct var for the ssh user.
switched to $USER
Change-Id: I6714361423948eb1764e9c18da699dafd4cd24a9
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
gerrit_verify_triggers:
- comment-added-contains-event:
comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(vote)$'
- - comment-added:
+ - comment-added-event:
approval-category: 'CRVW'
- approval-value: '+2'
+ approval-value: 2
- comment-added:
approval-category: 'Code-Review'
- approval-value: '+2'
+ approval-value: 2
#####################
# Job Configuration #
features:
- |
New ``info-vote-verify`` macro
- Will count votes against an INFO.yaml change and sumbit
- automatically if a majority of committers and tsc mebers
- vote +1 or +2 on the change.
+ Will count votes against an INFO.yaml change and sumbit automatically
+ if a majority of committers vote +1 or +2 on the change.
+ Job is triggered by +2 votes or a comment of "vote"
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
echo "---> check-info-votes.sh"
-set -xe -o pipefail
+set -u unset
ref=$(echo "$GERRIT_REFSPEC" | awk -F"/" '{ print $4 }')
pip="pip3"
exit "$exit_status"
else
echo "Vote completed submitting review"
- ssh -p "$GERRIT_PORT" "$JENKINS_SSH_CREDENTIAL"@"$GERRIT_HOST" gerrit review "$change" --submit
+ ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$change" --submit
fi