[JIRA] (JENKINS-41497) Poll SCM and Timer triggers include "Changes" for a Pipeline for any/all Shared Libraries

6 views
Skip to first unread message

tyler@monkeypox.org (JIRA)

unread,
Jan 26, 2017, 5:12:03 PM1/26/17
to jenkinsc...@googlegroups.com
R. Tyler Croy updated an issue
 
Jenkins / Bug JENKINS-41497
Poll SCM and Timer triggers include "Changes" for a Pipeline for any/all Shared Libraries

This looks like it's an underlying behavior in Pipeline.

Change By: R. Tyler Croy
Summary: Blue Ocean Poll SCM and Timer triggers include "Changes" for a Pipeline are from the completely wrong repository for any/all Shared Libraries
Component/s: pipeline
Component/s: blueocean-plugin
Priority: Major Minor
Attachment: classic-changes-view.png
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 'm 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 sure why expect my Shared Library changes to trigger a bunch of Pipelines for projects depending on them .
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Feb 10, 2017, 2:40:03 PM2/10/17
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
Change By: Andrew Bayer
Component/s: workflow-cps-global-lib-plugin
Component/s: workflow-job-plugin
Component/s: workflow-scm-step-plugin
Component/s: pipeline

jglick@cloudbees.com (JIRA)

unread,
Feb 10, 2017, 3:34:02 PM2/10/17
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
 
Jenkins / Improvement JENKINS-41497

As designed, but an RFE to disable changelog and/or polling for library checkouts.

Change By: Jesse Glick
Issue Type: Bug Improvement
Component/s: workflow-job-plugin
Component/s: workflow-scm-step-plugin

doronshai@gmail.com (JIRA)

unread,
May 2, 2018, 7:01:03 AM5/2/18
to jenkinsc...@googlegroups.com
Doron Shai commented on Improvement JENKINS-41497
 
Re: Poll SCM and Timer triggers include "Changes" for a Pipeline for any/all Shared Libraries

I see this issue again on plugin 2.9 and Jenkins 2.107.2.

Does someone knows if this can be solved somehow? 

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

doronshai@gmail.com (JIRA)

unread,
May 2, 2018, 7:22:04 AM5/2/18
to jenkinsc...@googlegroups.com
Doron Shai reopened an issue
 

I see this issue once again with Jenkins 2.107.2

Change By: Doron Shai
Resolution: Fixed
Status: Resolved Reopened

doronshai@gmail.com (JIRA)

unread,
May 2, 2018, 8:53:16 AM5/2/18
to jenkinsc...@googlegroups.com
Doron Shai edited a comment on Improvement JENKINS-41497
 
Re: Poll SCM and Timer triggers include "Changes" for a Pipeline for any/all Shared Libraries
I see this issue once again with Jenkins {color:#ff0000}* 2.107.2 *{color}, on *{color:#14892c}2.107.1{color}* it is working just fine

doronshai@gmail.com (JIRA)

unread,
May 2, 2018, 8:53:21 AM5/2/18
to jenkinsc...@googlegroups.com
Doron Shai updated an issue
 
Change By: Doron Shai
Comment:
I see this issue again on plugin 2.9 and Jenkins 2.107.2.

Does someone knows if this can be solved somehow? 

roskoff@gmail.com (JIRA)

unread,
May 18, 2018, 10:35:03 AM5/18/18
to jenkinsc...@googlegroups.com
Eliseo Ocampos commented on Improvement JENKINS-41497
 
Re: Poll SCM and Timer triggers include "Changes" for a Pipeline for any/all Shared Libraries

This bug is still present on version 2.116. I found that the workaround mentioned here is the way to go for the moment. Thanks Allan BURDAJEWICZ!

petri.jarvenpaa@gmail.com (JIRA)

unread,
Jun 12, 2018, 4:35:03 AM6/12/18
to jenkinsc...@googlegroups.com

Hello and sorry for being bit thick, but where is this "global configuration" located and changed?

I am trying to have implicitly loaded library for certain folder, but I cant figure how to stop the builds triggering continuously from shared lib commits.

roskoff@gmail.com (JIRA)

unread,
Jun 13, 2018, 3:06:01 PM6/13/18
to jenkinsc...@googlegroups.com

Go to Manage Jenkins -> Configure System and there find the section "Global Pipeline Libraries"

petri.jarvenpaa@gmail.com (JIRA)

unread,
Jun 14, 2018, 6:51:38 AM6/14/18
to jenkinsc...@googlegroups.com

"Dont trigger build a build on commit notifications" this setting for the library should stop the triggering?

This is what I already tested, and no matter if I let jobs trigger and build, they will trigger second, third and fourth time as well from commits to shared library.

roskoff@gmail.com (JIRA)

unread,
Jun 14, 2018, 2:29:03 PM6/14/18
to jenkinsc...@googlegroups.com

shahin.kordasti@gmail.com (JIRA)

unread,
Nov 28, 2018, 9:05:10 AM11/28/18
to jenkinsc...@googlegroups.com

I am confused as to what the "fix" is. I enabled the setting "Dont trigger build a build on commit notifications" for all our Jenkins jobs and they still get triggered whenever the global library SCM has a commit and this keeps happening after the first time. Do I need to remove the global library and re-add it again for this to work?

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jchill2.spam@gmail.com (JIRA)

unread,
Nov 28, 2018, 11:49:03 AM11/28/18
to jenkinsc...@googlegroups.com

This is a pretty significant issue. We've removed our Global Pipeline Library config, restarted jenkins and it's still triggering events

jchill2.spam@gmail.com (JIRA)

unread,
Nov 28, 2018, 11:57:04 AM11/28/18
to jenkinsc...@googlegroups.com
John Hill updated an issue
 
Change By: John Hill
Comment:
This is a pretty significant issue. We've removed our Global Pipeline Library config, restarted jenkins and it's still triggering events

aloria@haworthmedia.com (JIRA)

unread,
Jan 2, 2019, 3:04:03 PM1/2/19
to jenkinsc...@googlegroups.com
Angelo Loria commented on Improvement JENKINS-41497
 
Re: Poll SCM and Timer triggers include "Changes" for a Pipeline for any/all Shared Libraries

Seeing this exact issue on Jenkins 2.150.1, Build Pipeline 1.5.8. Have a global library set up in one repo/configured under Global Configuration, and a multibranch job that polls a different repo for changes to specific branches. Upon committing anything to any file in the global library repo, the multibranch job is triggered. I've read every thread I can find on the issue but cannot figure out how to not have jobs triggered when committing changes to the global library repo. It's basically unusable at this point, as I can't continue to trigger all jobs over and over. 

mneale@cloudbees.com (JIRA)

unread,
Jan 2, 2019, 7:43:02 PM1/2/19
to jenkinsc...@googlegroups.com

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. 

swtch3k@gmail.com (JIRA)

unread,
Feb 22, 2019, 4:21:04 PM2/22/19
to jenkinsc...@googlegroups.com

valide workaround for me was to add an additional behavior at the pipeline definition for the jenkinsfile or one 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...

swtch3k@gmail.com (JIRA)

unread,
Feb 22, 2019, 4:22:04 PM2/22/19
to jenkinsc...@googlegroups.com
Cenk Tosun edited a comment on Improvement JENKINS-41497
valide workaround for me was to add an additional behavior at the pipeline definition for the jenkinsfile or one 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...

williambrode@gmail.com (JIRA)

unread,
Mar 12, 2019, 7:14:07 PM3/12/19
to jenkinsc...@googlegroups.com

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).

doronshai@gmail.com (JIRA)

unread,
Mar 19, 2019, 6:03:04 AM3/19/19
to jenkinsc...@googlegroups.com

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....

swtch3k@gmail.com (JIRA)

unread,
Mar 21, 2019, 7:43:03 AM3/21/19
to jenkinsc...@googlegroups.com

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

hjink94@gmail.com (JIRA)

unread,
Apr 8, 2019, 1:46:05 PM4/8/19
to jenkinsc...@googlegroups.com

dmladek@gmail.com (JIRA)

unread,
Apr 29, 2019, 5:18:10 PM4/29/19
to jenkinsc...@googlegroups.com
Daniel Mladek commented on Improvement JENKINS-41497
 
Re: Poll SCM and Timer triggers include "Changes" for a Pipeline for any/all Shared Libraries

Just would like to confirm, that I'm observing this undesirable behaviour too on Jenkins v2.161 and all the relevant pipeline plugins (up-to-date). All source code including Jenkinsfiles are in SVN, shared libs in Git/Bitbucket.

 

Nearly after month of migrating legacy builds to new pipelines and going through the loop of learning and refactoring my Jenkinsfiles to make them leaner and started using a [shared library|https://jenkins.io/doc/book/pipeline/shared-libraries/], each time I do a change in a shared lib, it triggers all the pipeline jobs. It's really nightmare.

 

 

 

dmladek@gmail.com (JIRA)

unread,
Apr 29, 2019, 5:29:03 PM4/29/19
to jenkinsc...@googlegroups.com
Daniel Mladek edited a comment on Improvement JENKINS-41497
Just would like to confirm, that I'm observing this undesirable behaviour too on Jenkins v2.161 and all the relevant pipeline plugins (up-to-date). All source code including Jenkinsfiles are in SVN, shared libs in Git/Bitbucket.

 

Nearly after month of migrating legacy builds to new pipelines and going through the loop of learning and refactoring my Jenkinsfiles to make them leaner and started using a [shared library|[https://jenkins.io/doc/book/pipeline/shared-libraries/]], each time I do a change in a shared lib, it triggers all the pipeline jobs. It's really nightmare.

 

I understand that there might be a need for this behaviour if a sort of part of a build script has been changed, to validate the rest of the code it is still buildable, OTOH if you're in a building stage of setting up your build system, this is incredible annoying. (For the same reason, I'm almost thinking to setup external repo just for the Jenkinsfiles to avoid unnecessary triggers of build jobs when modified Jenkinsfile in SCM. Having it inside the job configuration or using old fashioned freestyle jobs, exactly achieve this, but without additional benefits of using pipelines.)

 

So ideally, this behaviour would be configurable (like as it is now for *Include @Library changes in job recent changes*.)

 

 

 

 

 

doronshai@gmail.com (JIRA)

unread,
Jun 24, 2019, 7:24:04 AM6/24/19
to jenkinsc...@googlegroups.com

jackie.xiao@ebaotech.com (JIRA)

unread,
Aug 2, 2019, 2:57:03 AM8/2/19
to jenkinsc...@googlegroups.com

No matter how many new features being added to Jenkins, lack of support and issue fixing for such basic issues will eventually drove users away.

Goodbye Jenkins

jenkins@mockies.de (JIRA)

unread,
Aug 7, 2019, 12:33:05 PM8/7/19
to jenkinsc...@googlegroups.com

I'm also affected by this issue running Jenkins ver. 2.176.2 with "Pipeline: Shared Groovy Libraries" version 2.14

I just recently switched to shared libs from internal workflowLibs.git. I added a global shared library using Subversion defined with "Load implicitly: true", "Allow default version to be overridden: true" and "Include @Library changes in job recent changes: true".
After the global library was used in the build for the first time, subsequent builds are now triggered whenever something changes in the global library.

I was not able to resolve this by simply deactivating "Include @Library changes in job recent changes". Still, builds were triggered for every commit in the shared lib. Only after a Jenkins restart ("Include @Library changes in job recent changes" is still false) the job is no longer triggered.

Why are polling and changelog bound to each other in shared libraries in the first place? In the "checkout" step these are two different options (or am I misreading something?).

In my case, the project that is triggered does NOT poll the SCM but is configured to only react on push notifications. So, this might be a different issue? Should I open a new bug report?

syaramada-c@scrippsnetworks.com (JIRA)

unread,
Oct 16, 2019, 5:29:07 PM10/16/19
to jenkinsc...@googlegroups.com

Even we are facing same issue , opened a ticket - https://issues.jenkins-ci.org/browse/JENKINS-52816

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages