Stoogy
Stoogy

Reputation: 1351

Hide Jenkins comments in Gerrit

I have a Jenkins setup to be triggered by Gerrit once a patch is updated. I am looking for a way to hide all the messages generated by Jenkins to concentrate on the reviewer's comments.

Messages from Jenkins are something like:

Patch Set <id>:
Build Started <url> (1/16)

Which pollutes the comment section.

Is there any way to achieve that?

Upvotes: 2

Views: 656

Answers (1)

In Gerrit 2.15 and above it's possible to filter out the Jenkins messages by clicking on "Show Comments Only" button at the change screen.

It's necessary to configure Jenkins to use a tag when adding the message, for example:

gerrit review <CHANGE>,<PATCHSET> --message 'Job started <BUILDURL>' --code-review <CODE_REVIEW> --tag 'autogenerated:jenkins'

If you're using gerrit-trigger plugin you can configure this at Jenkins > Gerrit Trigger > Edit

Tagged comments are not shown when "Show Comments Only" are selected.

Upvotes: 1

Related Questions