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

Poll SCM and Timer triggers include "Changes" for a Pipeline for any/all Shared Libraries

    XMLWordPrintable

    Details

    • Similar Issues:
    • Sprint:
      Pipeline - July/August

      Description

      I noticed this while filing another ticket (JENKINS-41496), but the "Changes" view for the Pipeline run for this project "azure" has the "wrong commits" shown. See the screenshots for more.

      What basically appears to be happening is that any change to a Shared Library will result in newly triggered Pipelines which have "Poll SCM" configured. Pipelines which configure a timer will also have Changes from the Shared Library listed when it executes again.

      I think listing the Shared Library commits in "Changes" is acceptable, but triggering based on an SCM Poll for a Pipeline is very confusing behavior and IMHO incorrect behavior.

      As a shared tooling team, I would not expect my Shared Library changes to trigger a bunch of Pipelines for projects depending on them.

        Attachments

          Issue Links

            Activity

            Hide
            timja Tim Jacomb added a comment -

            You can configure it in the global config (which is what we do) no idea about in the pipeline

            Show
            timja Tim Jacomb added a comment - You can configure it in the global config (which is what we do) no idea about in the pipeline
            Hide
            dordor dor s added a comment -

            Hi Tim Jacomb , thank you for your reply. I forgot to mention it but I already tried to configure it in the global config but it's not affect on my declarative pipeline which located in github organization. So in case that there are new commits in the shared library git repo I see those changes as part of the pipeline which can be confusing or affect the change set array that I use to detect what files has been changed 

            Show
            dordor dor s added a comment - Hi Tim Jacomb , thank you for your reply. I forgot to mention it but I already tried to configure it in the global config but it's not affect on my declarative pipeline which located in github organization. So in case that there are new commits in the shared library git repo I see those changes as part of the pipeline which can be confusing or affect the change set array that I use to detect what files has been changed 
            Hide
            ahammar Anders Hammar added a comment - - edited

            dor s We have the same issue with declarative pipelines where I can't figure out how to turn off changelog. The global configuration doesn't seem to work. It's turned off but changelogs is still included for shared libraries.
            We're using v2.17 of workflow-cps-global-lib-plugin.

            Show
            ahammar Anders Hammar added a comment - - edited dor s We have the same issue with declarative pipelines where I can't figure out how to turn off changelog. The global configuration doesn't seem to work. It's turned off but changelogs is still included for shared libraries. We're using v2.17 of workflow-cps-global-lib-plugin.
            Hide
            richmond Rich added a comment -

            I am facing similar issue. When I unselect 'Include @Library changes in job recent changes' and restart Jenkins, changelog does not show changes made to shared library but any change in shared library is still triggering the build.

            Show
            richmond Rich added a comment - I am facing similar issue. When I unselect 'Include @Library changes in job recent changes' and restart Jenkins, changelog does not show changes made to shared library but any change in shared library is still triggering the build.
            Hide
            dordor dor s added a comment -

            I still can't find a way to disable the change log for the shared library changes (which is not relevant for me) in declerative pipelines

             

            is seems that the default is true

            apperantly thhis is the relevant code:

             

                private Boolean changelog = true;
                ...
                // default to including changes of the library in job recent changes
                @DataBoundSetter public void setChangelog(Boolean changelog) {
                    this.changelog = changelog;
                }

             

            https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/libs/LibraryStep.java#L111-L114

             

            and this

             

                static void doRetrieve(String name, boolean changelog, @Nonnull SCM scm, FilePath target, Run<?, ?> run, TaskListener listener) throws Exception {
                    ...
                    delegate.setChangelog(changelog);

             

            https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/libs/SCMSourceRetriever.java#L139

             

            more info here: https://issues.jenkins.io/browse/JENKINS-41497?focusedCommentId=394574&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-394574

            Devin Nusbaum any chance that you can have a look?

             

            Show
            dordor dor s added a comment - I still can't find a way to disable the change log for the shared library changes (which is not relevant for me) in declerative  pipelines   is seems that the default is true apperantly thhis is the relevant code:   private Boolean changelog = true ; ... // default to including changes of the library in job recent changes @DataBoundSetter public void setChangelog( Boolean changelog) { this .changelog = changelog; }   https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/libs/LibraryStep.java#L111-L114   and this   static void doRetrieve( String name, boolean changelog, @Nonnull SCM scm, FilePath target, Run<?, ?> run, TaskListener listener) throws Exception { ... delegate.setChangelog(changelog);   https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/libs/SCMSourceRetriever.java#L139   more info here:  https://issues.jenkins.io/browse/JENKINS-41497?focusedCommentId=394574&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-394574 Devin Nusbaum  any chance that you can have a look?  

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rtyler R. Tyler Croy
              Votes:
              79 Vote for this issue
              Watchers:
              86 Start watching this issue

                Dates

                Created:
                Updated: