Reputation: 16349
How to send a custom message to Gerrit with the Custom build messages
field in the Gerrit trigger options in Jenkins?
The setting of the location is on job properties -> gerrit trigger -> advanced
I have defined a in the Build Start Message
field: My custom message
I would expect to se this message in Gerrit, however no comment is shown. If i remove the custom message, il leaves the default comment for the Start message.
Should the Custom build messages be pure strings or something different?
Upvotes: 0
Views: 3235
Reputation: 16349
I reinstalled the whole system after which the Custom build message
field started acting as expected.
It seems the problem was that i edited the message in the global Gerrit Verified Commands
before (i did however return it to default settings before trying Custom build message)
Upvotes: 0
Reputation: 6842
You can set the message in the global gerrit trigger settings: jenkins->manage->gerrit trigger
Then under the advanced section you can see the Gerrit Verified Commands that the gerrit trigger uses to update gerrit. This is what I see for the started event:
gerrit approve <CHANGE>,<PATCHSET> --message 'Build Started <BUILDURL> <STARTED_STATS>' --verified <VERIFIED> --code-review <CODE_REVIEW>
You should be able to change the message there.
Upvotes: 1