[JIRA] (JENKINS-39615) Global Pipeline Libraries triggers the 'poll SCM' of jobs

9 views
Skip to first unread message

squalou.jenkins@gmail.com (JIRA)

unread,
Nov 9, 2016, 6:14:01 AM11/9/16
to jenkinsc...@googlegroups.com
squalou jenkins created an issue
 
Jenkins / Bug JENKINS-39615
Global Pipeline Libraries triggers the 'poll SCM' of jobs
Issue Type: Bug Bug
Assignee: Unassigned
Components: workflow-cps-global-lib-plugin
Created: 2016/Nov/09 11:13 AM
Environment: linux rhel7.2
jenkins 2.19.2
up to date 'workflow' set of plugins (on stable update center)
Priority: Minor Minor
Reporter: squalou jenkins

I have this situation where :

  • I have some jobs that gets sources from a SCM, and performs a 'poll SCM' hourly
  • I have a 'global pipeline lib' defined, on another SCM (doesn't matter really, what atters is it's not in the same source tree s the jobs)

My issue is that any commit to the 'global pipeline lib' SCM will be detected by all the jobs that have a 'poll SCM' configured.

I wish I can exclude the global lib from polling.

(and yes, I know, polling is evil, whenever I can I have triggers configured on modern scm to push jobs, but sometimes it's just not possible, believe me you don't want to know all the why's)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

squalou.jenkins@gmail.com (JIRA)

unread,
Nov 21, 2016, 3:42:01 AM11/21/16
to jenkinsc...@googlegroups.com

squalou.jenkins@gmail.com (JIRA)

unread,
Nov 21, 2016, 3:46:01 AM11/21/16
to jenkinsc...@googlegroups.com
squalou jenkins commented on Bug JENKINS-39615
 
Re: Global Pipeline Libraries triggers the 'poll SCM' of jobs

I allow myself to increase criticality. Why ? because in my infrastructure I have dozens of jenkins master with plenty of jobs in each.

Our target is to share a common lib, and this feature is really welcome.

Matter is : each commit to the lib leads to hundreds of jobs triggered. So for now we stopped the deployment of this feature. There is no easy workaround in our case. (again : if I could get rid of poll-scm I would, but I can't)

jglick@cloudbees.com (JIRA)

unread,
Nov 21, 2016, 5:10:04 PM11/21/16
to jenkinsc...@googlegroups.com

Probably same as JENKINS-38679; needs investigation and a minimal test case.

squalou.jenkins@gmail.com (JIRA)

unread,
Nov 24, 2016, 10:04:02 AM11/24/16
to jenkinsc...@googlegroups.com

I can explain a very simple testcase if you want.

setup

declare a workflow lib, call it 'test-lib', in jenkins global settings, pointing, say, to GIT some-test-ib-repo

create a workflow job

Point the pipeline to a Jenkinsfile hosted another GIT repo (some-repo/some-project.git)

stage ('dummy'){
println 'I have run'
}

Tick 'POLL SCM', H/5 * * * * should do

test

submit anything on 'some-test-ib-repo', which is NOT the repo of the scm declared in the pipeline

wait 5 minutes

the job runs.

roidelapluie@inuits.eu (JIRA)

unread,
Dec 17, 2016, 4:13:01 PM12/17/16
to jenkinsc...@googlegroups.com

I even tried to add the hudson.plugins.git.extensions.impl.IgnoreNotifyCommit() extention without success.

roidelapluie@inuits.eu (JIRA)

unread,
Dec 18, 2016, 2:08:01 AM12/18/16
to jenkinsc...@googlegroups.com
Julien Pivotto edited a comment on Bug JENKINS-39615
I even tried to add the hudson.plugins.git.extensions.impl.IgnoreNotifyCommit() extention without success.


EDIT: that works

roidelapluie@inuits.eu (JIRA)

unread,
Dec 18, 2016, 2:57:03 AM12/18/16
to jenkinsc...@googlegroups.com

roidelapluie@inuits.eu (JIRA)

unread,
Dec 18, 2016, 2:57:06 AM12/18/16
to jenkinsc...@googlegroups.com

roidelapluie@inuits.eu (JIRA)

unread,
Dec 18, 2016, 2:59:02 AM12/18/16
to jenkinsc...@googlegroups.com

roidelapluie@inuits.eu (JIRA)

unread,
Dec 18, 2016, 2:59:02 AM12/18/16
to jenkinsc...@googlegroups.com

roidelapluie@inuits.eu (JIRA)

unread,
Dec 23, 2016, 5:37:02 AM12/23/16
to jenkinsc...@googlegroups.com
Julien Pivotto edited a comment on Bug JENKINS-39615
 
Re: Global Pipeline Libraries triggers the 'poll SCM' of jobs
[~squalou] A workaround that might work:

!wa.png|thumbnail!


EDIT: confirmed that it does not work

roidelapluie@inuits.eu (JIRA)

unread,
Dec 23, 2016, 5:37:02 AM12/23/16
to jenkinsc...@googlegroups.com
Julien Pivotto edited a comment on Bug JENKINS-39615
I even tried to add the hudson.plugins.git.extensions.impl.IgnoreNotifyCommit() extention without success.

EDIT: confirmed that works it does not work

roidelapluie@inuits.eu (JIRA)

unread,
Dec 23, 2016, 5:42:01 AM12/23/16
to jenkinsc...@googlegroups.com

"(and yes, I know, polling is evil, whenever I can I have triggers configured on modern scm to push jobs, but sometimes it's just not possible, believe me you don't want to know all the why's)"

It is not evil. We use polling without schedule (https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Pushnotificationfromrepository) so it is more pushing than polling, and still have the problem.

jenkins-ci@munkyboy.com (JIRA)

unread,
Feb 7, 2017, 9:42:01 PM2/7/17
to jenkinsc...@googlegroups.com
Mike commented on Bug JENKINS-39615

I ran into this problem as well. I found a workaround for my setup.

I'm using bitbucket which offers a ssh and http clone url for repos. For the global library config, I use the http clone url. For the actual job tied the library (and corresponding bitbucket hook), I use the ssh url.

jglick@cloudbees.com (JIRA)

unread,
Feb 10, 2017, 4:02:04 PM2/10/17
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Duplicate
 
Change By: Jesse Glick
Status: Open Resolved
Resolution: Duplicate

mathieulaude@gmail.com (JIRA)

unread,
Mar 23, 2017, 1:17:02 PM3/23/17
to jenkinsc...@googlegroups.com
Mathieu Laude updated an issue
Change By: Mathieu Laude
Attachment: image-2017-03-23-18-16-01-313.png
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

mathieulaude@gmail.com (JIRA)

unread,
Mar 23, 2017, 1:18:01 PM3/23/17
to jenkinsc...@googlegroups.com
Mathieu Laude commented on Bug JENKINS-39615
 
Re: Global Pipeline Libraries triggers the 'poll SCM' of jobs

Workaround that works for me is Additional Behaviours "Don't trigger a build on commit notifications" on the Global Pipeline Libraries configuration :

patrick@tario.org (JIRA)

unread,
Mar 14, 2018, 3:29:04 AM3/14/18
to jenkinsc...@googlegroups.com

Still seeing this as well, what I found interesting is that it seems to check for the current version on the SLAVE which doesn't make sense (our jobs pick slave depending on availability so they will not always run on the same node.)

mrkita@live.com (JIRA)

unread,
Apr 24, 2018, 10:16:02 AM4/24/18
to jenkinsc...@googlegroups.com

I have the same behavior, where my library is integrated into my main code repository.

In our Jenkins we have build jobs that are based off of multiple branches, and in each job where the library is included (the master version of the same repo by default), there are two entries in the polling log. One for the Library (at master version), and one for the actual checkout in the pipeline definition.

This is a big problem, because the polling is marked as run for the library entry, but if we the pipeline checks out a different branch (and polls on it as is intended), it always returns that there are changes.

This leads to infinitely triggered builds as it never updates the status properly.

I could pull out the library code into it's own repo, but I assume that means it will still show up in the polling log, which it should not.

I have unchecked the "Include @Library changes in job recent changes" flag in the global library configuration and since we use the "library step", I have set changelog: false in all the files which use it.

steven.kriegler@t-online.de (JIRA)

unread,
Apr 24, 2018, 4:41:03 PM4/24/18
to jenkinsc...@googlegroups.com
SK commented on Bug JENKINS-39615

Can someone finally fix this please? It is really annoying, especially because the "Include @Library changes in job recent changes" option has no effect.

Everytime I work on my shared library all multibranch pipeline jobs are going to run.

jackie.xiao@ebaotech.com (JIRA)

unread,
May 2, 2018, 5:01:02 AM5/2/18
to jenkinsc...@googlegroups.com

Also facing this issue, we have lots of microservice CI/CD jobs configured, which depend on the shared library, any change made to the shared lib will trigger all downstream jobs.

Looking forward to the fix.

roskoff@gmail.com (JIRA)

unread,
May 18, 2018, 10:39:04 AM5/18/18
to jenkinsc...@googlegroups.com

For everyone who may still facing this problem, please refer to the workaround mentioned here. I can confirm it solves the problem.

brian.villanueva@nice.com (JIRA)

unread,
Oct 10, 2018, 3:43:03 PM10/10/18
to jenkinsc...@googlegroups.com

Running a full pipeline might take a long time... especially if you have 10s or 100s that are affected by the issue. Does anyone know if there's a way to alter the config proactively (manually) via the job's XML file?

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

chris_knight@standardlife.com (JIRA)

unread,
Oct 10, 2019, 10:16:06 AM10/10/19
to jenkinsc...@googlegroups.com

"Include @Library changes in job recent changes" did fix this issue for us.  However, importantly, we had to restart our Jenkins server for this to take effect. 

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