From: Aric Gardner Date: Thu, 4 Apr 2019 19:56:01 +0000 (-0400) Subject: Fixes for info votes X-Git-Tag: v0.36.0~5^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=99d9f864cb6b47631503472f064693fc7f68ec8e;p=releng%2Fglobal-jjb.git Fixes for info votes 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 --- diff --git a/jjb/lf-info-vote.yaml b/jjb/lf-info-vote.yaml index 012400f3..3c421aa6 100644 --- a/jjb/lf-info-vote.yaml +++ b/jjb/lf-info-vote.yaml @@ -53,12 +53,12 @@ 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 # diff --git a/releasenotes/notes/lf-info-vote-74329a41dfea62be.yaml b/releasenotes/notes/lf-info-vote-74329a41dfea62be.yaml index e94e31d3..0b7a963f 100644 --- a/releasenotes/notes/lf-info-vote-74329a41dfea62be.yaml +++ b/releasenotes/notes/lf-info-vote-74329a41dfea62be.yaml @@ -2,6 +2,6 @@ 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" diff --git a/shell/check-info-votes.sh b/shell/check-info-votes.sh index 892dd899..72dec3b8 100644 --- a/shell/check-info-votes.sh +++ b/shell/check-info-votes.sh @@ -9,7 +9,7 @@ # 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" @@ -45,5 +45,5 @@ if [[ "$exit_status" -ne 0 ]]; then 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