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

Global Pipeline Library changelog setting always ignored when using the library step

XMLWordPrintable

      Symptom

      library step adds changelog to the build even though system configuration for the library has "Include @Library changes in job recent changes?" unchecked.

      Reproduction Steps

      • Stand up a controller
      • Configure a "Global Pipeline Library"
      • Uncheck "Include @Library changes in job recent changes"
      • Ensure "Load implicitly" is not checked
      • Create two Pipelines
      • First pipeline uses the @Library annotation to load the above library and use a test step
      • Second pipeline uses the library step to do the same
      • Run the pipelines
      • Make a new commit to the shared library repository
      • Run the pipelines again

      Expected: The second run of both pipelines shows no Changes
      Actual: The second run of Pipeline that uses library step shows the commit from step 5 in Changes

      The workaround is to explicitly set the changelog argument of the library step.

      Cause

      The optional changelog argument of the library step defaults to true instead of the value of the system configuration. The method defaultedChangelog, called here in the run() of the step’s execution, is supposed to default to the includeInChangesets value (aka "Include @Library changes in job recent changes") if the changelog is null. However its parameter is never really null - the changelog field of the LibraryStep is set to true by default.

            Unassigned Unassigned
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: