-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins version 1.634
Git plugin version 2.4.1
I have a job "Build" that is a downstream job and has no poller associated with it. Sometimes, this job runs listing it's trigger as "SCM Change". This job has no poller at all, it is only invoked by upstream job "Poll Branch". The "Build" job shows a empty poller log in the cases when it thinks it was triggered by a SCM change.
It only seems happen when I am making changes to my gitflow branches feature/something, or when I'm manually triggering the "Poll Branch" job for those branches. It does not occur when I am making changes to branches master or develop. Both "Build" jobs have the same timestamp.
So I'm suspecting the poller job is somehow triggering the downstream job twice, once as normal and once where the downstream job thinks it was triggered by a SCM change.
Note: This (maybe same/related) issue has several other people saying "me too" although that bug is for integrity SCM. https://issues.jenkins-ci.org/browse/JENKINS-17614
Note: If the developer needs, I can give him access to the Jenkins server in question (for the next week or so before it gets rebuilt).
- duplicates
-
JENKINS-17614 Jenkins triggers builds on git SCM changes, but nothing changed
-
- Resolved
-
Hello Dan, I'll try to give you more details and I'll attach some of the job XML's as well although I don't know if they are different now that I have the plugin disabled.
1. Branch name is apparently the key here. If the poller is polling branch "develop" or "master", the behavior is as expected. if the poller is polling branch "feature/test", then the behavior happens. I'm suspecting the '/' in the branch name (which comes from gitflow branching schema).
2. the downstream "build" job does have parameters, which are all appear blank in the case of the "SCM" trigger.
3. what downstream does is not important, right now it simply aborts if it has no parameters.
Also note - the poller does have a build-pipeline-view tab setup for it.
Another thing I noticed when copying the xml jobs, the job for the feature poller did NOT have the
"<?xml version="1.0" encoding="UTF-8"?>" at the top. Thats likely a bug with the jenkins job dsl plugin, and may or may not be a factor.
Expect:
When manually hitting the "build now" on the "branch poller" job it should build the downstream job once.
Observe:
If the branch is "master" or "develop" it behaves as expected.
If the branch is "feature/[^attachment-name.zip]" then downstream builds once as expected, but it also build a second time without parameters listing it as triggered by SCM change. The 2nd (SCM) job lists a git polling log, but it's completely blank.