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

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

      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
            michaelneale Michael Neale added a comment -

            Angelo Loria not sure if that is related to this issue: but I think that may be possible by using "when" and looking at the cause/trigger. So when global libraries are updated, the job will run, but terminate early (green) as it can skip the rest of the build. Kind of a work around. 

            Show
            michaelneale Michael Neale added a comment - Angelo Loria not sure if that is related to this issue: but I think that may be possible by using "when" and looking at the cause/trigger. So when global libraries are updated, the job will run, but terminate early (green) as it can skip the rest of the build. Kind of a work around. 
            Hide
            swtch3k Cenk Tosun added a comment - - edited

            valide workaround for me was to add an additional behavior at the pipeline definition for the jenkinsfile or at the shared library repo definition, where to use ignore certain path with an inclusion of "ignoreRepo". no more additional builds. hope that bug get fixed or the option will disabled...

            Show
            swtch3k Cenk Tosun added a comment - - edited valide workaround for me was to add an additional behavior at the pipeline definition for the jenkinsfile or at the shared library repo definition, where to use ignore certain path with an inclusion of "ignoreRepo". no more additional builds. hope that bug get fixed or the option will disabled...
            Hide
            wbrode William Brode added a comment -

            Cenk Tosun another solution to your issue is to use "lightweight" checkout when defining the Jenkinsfile SCM.  I think it was intended behavior to allow polling on changes to the jenkinsfile scm - but lightweight will disable that (if you are using an SCM that supports it).

            Show
            wbrode William Brode added a comment - Cenk Tosun another solution to your issue is to use "lightweight" checkout when defining the Jenkinsfile SCM.  I think it was intended behavior to allow polling on changes to the jenkinsfile scm - but lightweight will disable that (if you are using an SCM that supports it).
            Hide
            doronshai Doron Shai added a comment -

            William Brode I do not see that the lightweight checkout actually solve this issue.

            I do not understand why and how this issue is still open. this is a MAJOR problem with Jenkins....

            Show
            doronshai Doron Shai added a comment - William Brode I do not see that the lightweight checkout actually solve this issue. I do not understand why and how this issue is still open. this is a MAJOR problem with Jenkins....
            Hide
            swtch3k Cenk Tosun added a comment -

            William Brode as Doron Shai has already said, this unfortunately does not help to solve the problem...

            Show
            swtch3k Cenk Tosun added a comment - William Brode  as Doron Shai has already said, this unfortunately does not help to solve the problem...

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                rtyler R. Tyler Croy
              • Votes:
                63 Vote for this issue
                Watchers:
                72 Start watching this issue

                Dates

                • Created:
                  Updated: