[JIRA] (JENKINS-61433) Manual SCM Polling for pipeline starts even though no changes on branch

22 views
Skip to first unread message

gntleone@gmail.com (JIRA)

unread,
Mar 11, 2020, 10:01:08 AM3/11/20
to jenkinsc...@googlegroups.com
lee benhart created an issue
 
Jenkins / Bug JENKINS-61433
Manual SCM Polling for pipeline starts even though no changes on branch
Issue Type: Bug Bug
Assignee: Mark Waite
Components: git-plugin
Created: 2020-03-11 14:00
Environment: Jenkins ver 2.204.2
Priority: Minor Minor
Reporter: lee benhart
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

gntleone@gmail.com (JIRA)

unread,
Mar 11, 2020, 10:12:04 AM3/11/20
to jenkinsc...@googlegroups.com
lee benhart updated an issue
Change By: lee benhart
Manually setting a pipeline job to poll SCM is resulting in a build being triggered each and every time polling starts.

In reviewing logs, the only change I see is the TAG created by the build itself.  No other commits are in place.

Typical pipeline configuration is to poll SCM for change, build component, TAG the commit of the successful build, and post step will deleteDir() after each build.

While a tag is not seen as a commit, it is clear that in GIT, a tag is given a unique hash.

I have tried ignoring commits by the build user, but since the tag is not a code change, this does not work.

I have tried ignoring commits with messages, but since the tag is not seen as a commit, this does not work.

I have tried using a REGEX to ignore tags, however I am getting errors with the regex and illegal characters, so this has not worked either.

 

gntleone@gmail.com (JIRA)

unread,
Mar 11, 2020, 10:13:03 AM3/11/20
to jenkinsc...@googlegroups.com

gntleone@gmail.com (JIRA)

unread,
Mar 11, 2020, 10:28:04 AM3/11/20
to jenkinsc...@googlegroups.com
lee benhart updated an issue
Change By: lee benhart
Environment: Jenkins ver 2.204.2
git 4.0.0-rc
git-changelog 2.17
git-client 3.0.0-rc
git-server 1.7
github 1.29.4
github-api 1.95
github-branch-source 2.5.5
github-organization-folder 1.6
scm-api 2.6.3
workflow-scm-step 2.9
os.arch amd64
os.name Linux
os.version 3.10.0-1062.9.1.el7.x86_64

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 11, 2020, 11:08:02 AM3/11/20
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 11, 2020, 11:08:03 AM3/11/20
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-61433
 
Re: Manual SCM Polling for pipeline starts even though no changes on branch

Please update your git plugin and git client plugin to the released versions instead of the release candidate. Those release candidates are not being maintained since the official release of git plugin 4.0.0 and git client 3.0.0. May not resolve the issue but will avoid a number of other serious problems in those release candidates.

gntleone@gmail.com (JIRA)

unread,
Mar 11, 2020, 11:29:05 AM3/11/20
to jenkinsc...@googlegroups.com

Thanks Mark, I will do so, however we were seeing this with the earlier versions as well. I had to disable polling altogether about a year ago.  I had first thought it was purely related to bitbucket.  I re-enabled polling after we migrated our repositories to github, the issue persists.

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 11, 2020, 11:47:02 AM3/11/20
to jenkinsc...@googlegroups.com

My suspicion is that the tag is unrelated to the decision being made by the git plugin to start another build. Sometimes, jobs that are building on every poll will stop building on every poll when the branch name being built is changed from */master to refs/heads/master. The more specific reference avoids inadvertent detection of other changes which are unrelated to the specific branch.

gntleone@gmail.com (JIRA)

unread,
Mar 11, 2020, 8:40:02 PM3/11/20
to jenkinsc...@googlegroups.com

Mark, I I would be inclined to agree with you however we have a develop in the master branch on two separate pipe lines just to alleviate this issue

gntleone@gmail.com (JIRA)

unread,
Mar 11, 2020, 8:44:02 PM3/11/20
to jenkinsc...@googlegroups.com
lee benhart edited a comment on Bug JENKINS-61433
Mark, I I would be inclined to agree with you however we have a the develop in branch and the master branch on two separate pipe lines just to alleviate this pipelines, so the branch is not being changed. Could the issue be related to deleting the workspace in the post, after we have tagged? Could it be because we are tagging using git command line within the pipeline?

gntleone@gmail.com (JIRA)

unread,
Mar 11, 2020, 8:46:02 PM3/11/20
to jenkinsc...@googlegroups.com
lee benhart edited a comment on Bug JENKINS-61433
Mark, I would be inclined to agree with you however we have the develop branch and the master branch on two separate pipelines, so the branch is not being changed. I also updated the branch spec to use refs/head/${branch}. Could the issue be related to deleting the workspace in the post, after we have tagged? Could it be because we are tagging using git command line within the pipeline?

mark.earl.waite@gmail.com (JIRA)

unread,
Mar 13, 2020, 11:09:04 AM3/13/20
to jenkinsc...@googlegroups.com

I don't expect tagging and change detection to be related unless the check for remote changes is also looking for tags. As far as I recall, it is not checking for new tags, just new commits.

Reply all
Reply to author
Forward
0 new messages