*tl;dr:* make sure your repo doesn't have more than one branch that matches 
your Branch Specifier by using the full path to the branch: 
"refs/heads/master" instead of "origin/master"


Full story:
We were having similar problem with a job in Jenkins 2.19.4.

We would intentionally kick off a particular job, either manually or 
through a scheduled run, and then the job would keep building over and 
over. In fact, a second build would be scheduled just after the first one 
started.

Looking in the console output for the second and subsequent jobs, we saw

Started by an SCM change


as the first line. Odd, we weren't using SCM polling and even if we were, 
we weren't changing the source repo.


Further down in the console output, we saw:

Multiple candidate revisions

Scheduling another build to catch up with <...name_job...>


We were using origin/master as the branch specifier for the job. Turns out, 
our source repo had a branch named "master" and another named...sigh... 
"origin/master". 

Our theory is that, because we weren't specifying a full path for the 
branch, Jenkins was finding more than one branch and trying to kick of a 
job for both. Each subsequent job would find two branches, and try and kick 
off another build, and on and on.

FIX:
We changed the branch specifier in the job to "refs/heads/master". With the 
full path, Jenkins no longer thought there were multiple branches to build 
and the followup jobs quit happening.

P.S.:
As an aside, we also deleted the unexpected, unneeded branch 
"origin/master" from our repo, leaving just "master" behind. 

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/40b2aa0d-a7f3-4e78-aafc-6620eb9445a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to