Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57250

Gerrit trigger does not send results back to a correct server configuration

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: gerrit-trigger-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.164.2
      openjdk version "1.8.0_191"
      Gerrit version 2.14.16-105-g1fbfa3d565
      Gerrit trigger plugin 2.29.0
    • Similar Issues:

      Description

      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:

      Jussi Judin 14:55 Patch Set 5:
      Build Started first-server http://localhost.localdomain:8090/job/gerrit-test-first/5/ (1/2)
      

       
       

      Jussi Judin 14:55 Patch Set 5:
      Build Started second-server http://localhost.localdomain:8090/job/gerrit-test-second/5/ (2/2)
      

       
       

      Jussi Judin 14:55 Patch Set 5: Verified+1
      Build Successful first-server
      http://localhost.localdomain:8090/job/gerrit-test-first/5/ : SUCCESS
      http://localhost.localdomain:8090/job/gerrit-test-second/5/ : SUCCESS

       
      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.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              rsandell rsandell
              Reporter:
              ejusjud Jussi Judin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: