When having multiple server definitions for Gerrit trigger plugin under <jenkins-url>/gerrit-trigger/ that point to the same server, Gerrit trigger plugin only sends Successful results back to the first one for all jobs that may be configured to use different server instances. Different server instances can have different configuration, especially with the SSH interface in "Gerrit Verified Commands" and different jobs should be able to use these different server instances in the same Jenkins to submit their results.
How to replicate:
- Install Gerrit Trigger plugin
- Create a new server in <jenkins-url>/gerrit-trigger/ with the appropriate configuration.
- Create another Gerrit server connection to the same server with different name but change for example build successful message to "gerrit review <CHANGE>,<PATCHSET> --message 'Build Successful second-server <BUILDS_STATS>' ..."
- (restart Jenkins)
- Create a job that activates on Gerrit trigger event on the first server.
- Create a job that activates on Gerrit trigger event on the second server.
- Create a new patch set in Gerrit so that Gerrit trigger event activates.
This will then result in following 3 messages appearing in Gerrit:
Basically build started messages go to different server instances and their verification messages are properly modified. The final verification success status, however, groups all jobs from different Gerrit server instances into one message that then sets whatever labels are configured only for the first server. The second server does not see any action besides build started messages.
The main purpose of using this functionality is to enable different jobs setting different labels on a Gerrit instance and not having to use different Jenkins instances for that.