I have a voter project in Jenkins triggered by a gerrit event.My task is to figure out how send additional messages to gerrit (apart from the automatically sent by voters) during a build or after it with information regarding build status or which steps/tasks were successful.
Asked
Active
Viewed 1,434 times
2
-
I was going to ask the same question. I want those messages/notifications to apear beside the jenkins job link in the gerrit code review history as the build failure analyzer does it. – Philipp Michalski Oct 13 '16 at 13:40
1 Answers
1
I think we can send messages using Command Line Tools. Something like that would work..
ssh -p $GERRIT_PORT $GERRIT_HOST gerrit review --project "$GERRIT_PROJECT" --message '"Custom message"' "$GERRIT_PATCHSET_REVISION"
In order to include a variable in the message we would evaluate the command first.
eval ssh -p $GERRIT_PORT $GERRIT_HOST gerrit review --project "$GERRIT_PROJECT" --message \'\"Custom message. $BUILD_URL\"\' "$GERRIT_PATCHSET_REVISION"

ayakout
- 49
- 7