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

Additional behavior "Discover open changes" not working for using Gerrit as SCM in Jenkins Shared Library configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • gerrit-code-review-plugin 0.3.7
      Jenkins 2.190.3
      Gerrit 2.14.20
    • 0.4.1

      This plugin adds Gerrit as SCM. However, for using Gerrit as the SCM for configuring a Jenkins Shared Library, the additional behavior "Discover open changes" isn't working.

      How to replicate:

      Go to Manage Jenkins, click on Configure System. Scroll down to Global Pipeline Libraries. Configure everything as usual, select Gerrit for Source Code Management. You might take note that by default the Additional behavior "Discover open changes" comes. However, if you try to run a pipeline using a version of the library that is not merged yet (open change), Jenkins won't be able to fetch or locate that revision (the version is identified by the Git commit hash).

      Workaround:

      Since the option "Discover open changes doesn't work, you can delete it. On the additional behavior "Specify ref specs", add one and put the value: +refs/changes/:refs/changes/

      Now, if you try to run a pipeline specifying a version not merged yet, Jenkins will be able to fetch it.

            lucamilanesio Luca Domenico Milanesio
            felipecassiors Felipe Santos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: