[JIRA] (JENKINS-50832) PollSCM triggers jobs even if there are no changes jenkinsfile declarative

6 views
Skip to first unread message

michael.ibarra@hotmail.com (JIRA)

unread,
Apr 16, 2018, 5:19:02 PM4/16/18
to jenkinsc...@googlegroups.com
Luis Ibarra created an issue
 
Jenkins / Bug JENKINS-50832
PollSCM triggers jobs even if there are no changes jenkinsfile declarative
Issue Type: Bug Bug
Assignee: Vincent Latombe
Components: pollscm-plugin
Created: 2018-04-16 21:18
Environment: - Jenkins ver. 2.60.3
- Pipeline Plugin 1.2.7
- Pipeline: Multibranch 2.6
Labels: jenkinsfile pollscm github-plugin declarative pipeline
Priority: Blocker Blocker
Reporter: Luis Ibarra

 I'm using the github organization folder plugin to discover branches and pull requests dynamically. The discovery of new branches work as expected, but I want to reduce the time of discovering of new PR's and new commits for the specific repositories(by default is 1 day). For that I defined triggers { pollSCM('H/10 * * * *')} in the jenkinsfile(declarative) for some branches in some repos. I'm behind a firewall, so webhooks are not an option. However, the job triggers every 10 minutes in all the branches and PR's(until accepted) even if there are no changes after building once(it saves the trigger definition).

According to the triggers documentation, it should run only if there are changes.

I'm using this because GitSCM is not supported in the trigger definition. It would be super nice to have it in fact.

 

Any ideas in how to deal with this would be great/

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

info@whitediver.com (JIRA)

unread,
Jun 8, 2018, 6:30:01 PM6/8/18
to jenkinsc...@googlegroups.com
Sergey Arbuzov commented on Bug JENKINS-50832
 
Re: PollSCM triggers jobs even if there are no changes jenkinsfile declarative

Same issue with Jenkins ver 2.107 LTS
GitLab Multibranch plugin
 

rathneesh@gmail.com (JIRA)

unread,
Sep 20, 2019, 1:25:02 PM9/20/19
to jenkinsc...@googlegroups.com

Is there any work around available for this issue?

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

sss@secomea.com (JIRA)

unread,
Apr 8, 2020, 3:03:04 AM4/8/20
to jenkinsc...@googlegroups.com

We saw this issue too (Jenkins ver 2.190.1)

In our case, it turned out to be caused by the Jenkinsfile referring to a shared lib version (using @Library annotation) that was not at the HEAD of the shared lib repo.

Even when there were no changes on the main repo, the PollSCM trigger would detect changes on the shared lib repo, and trigger a new build (using the annotated shared lib version as expected) on each poll.

We worked around the issue by removing the pollSCM trigger from the Jenkinsfile, and instead configured the (multibranch) job with "Periodically if not otherwise run" in the "Scan Multibranch Pipeline Triggers" section.

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages