On Friday, June 30, 2017 at 5:56:40 AM UTC-7, Kevin Burnett wrote:
>
> so the job that doesn't fire has parameters. what about the job in the 
> same instance that you said works? does it have parameters? i'm believe 
> i've seen jobs with parameters not get triggered, but i'm not sure if 
> that's just how it works (job with parameters never get triggered) or if 
> there are some configurations where they can get triggered by changes in 
> source control and some configurations where they cannot.
>

The two jobs are identical, except for one small difference.  The job has 
parameters, and I set defaults in the job specification.  The single 
difference is in the "Branch Specifier".  My original job has "master", but 
the copied job is blank.

Today I stepped through the "GitStatus" code in the debugger, and I have a 
clearer picture of why it's not firing my desired job.  I understood why it 
fires the other job, because the "Branch Specifier" on that job is blank, 
but mine is set to "master".  A blank Branch Specifier matches anything.

What I discovered by stepping through the code is that even though my 
"notifyCommit" is the result of merging to the "master" branch, the 
"BranchSpec" in the resulting trigger has the name of the SOURCE branch, 
not the target branch.  That "source" branch is the name of my pull request 
branch, which definitely won't match with "master".

So, knowing what you know so far, why don't I just use the copied job that 
has "blank" for the Branch Specifier?  That's because I don't appear to be 
able to run this job manually from "Build with Parameters" in the GUI.  It 
fails because the blank in "Branch Specifier" makes it look at ALL 
branches, attempting to build all of them, and at least the first one 
fails, because that older branch was before I put the Jenkinsfile directly 
in the code repo (it used to be in a separate repo).  When I run it 
interactively, I want to build a single branch, not ALL of them.

I've summarized these same details in 
https://issues.jenkins-ci.org/browse/JENKINS-45246 .

>
>
> On Monday, June 26, 2017 at 1:51:21 PM UTC-4, David Karr wrote:
>>
>> For months now, I and the local Jenkins admins I work with, have been 
>> struggling with a problem where my main jenkins job is not firing on a 
>> "notifyCommit" firing from a BitBucket instance.  We actually were able to 
>> define another job in the same Jenkins instance, pointing to the same repo, 
>> that IS fired when the notifyCommit url is hit, but we still can't get the 
>> normal job to fire.  We also see the log entry that shows the notifyCommit 
>> call, but it just doesn't start the job.
>>
>> The job works fine when we run it manually, it just doesn't fire 
>> automatically.  It also works fine when it's spawned from the 
>> "buildWithParameters" URL, which we use to build pull request branches 
>> automatically (the same job is designed to build both master and pr 
>> branches).
>>
>> We've tried numerous variations of the value in the "Branches to build" 
>> field, but it doesn't appear to make any difference.
>>
>> We're using v2.46.2 of Jenkins and v3.3.0 of the git plugin for Jenkins.
>>
>> Assuming no one here has any bright ideas about why this is happening, I 
>> figure my next step is to connect to the Jenkins instance with a remote 
>> debugger and step through the code.  In order to do that, I have to obtain 
>> the correct code to step through, and some hints on some breakpoints to set.
>>
>> I figure I at least need the source for the correct release.  When I look 
>> on github, I see a release for "2.46.3", but not "2.46.2".  I do see that 
>> github has a "3.3.0" release for the git plugin, so I assume I'm ok there.
>>
>> Assuming I can get the 2.46.2 vs. 2.46.3 issue resolved, are there any 
>> other plugins that I need to get the source for in order to properly debug 
>> this?
>>
>

-- 
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/927c3d14-e75e-42dc-8814-f40e40e34c01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to