Actually, looking at the comments for the git hook feature, it seems that I 
still need to have Polling enabled on the job or it won't work. Leaving the 
schedule blank should work though. I will try that as soon as we can setup 
the hook on the remote.

On Monday, September 26, 2016 at 12:54:45 PM UTC-7, Cyril wrote:
>
> I'm not sure what you mean by "Multiple SCM". I don't see that option 
> anywhere so I guess I'm not using it.
>
> I am currently not using git hooks to trigger builds. I thought that the 
> job was supposed to be configured with Polling for it to work but it looks 
> like I misunderstood, and that I just need to have polling set to true 
> (which is the default if not specified) when doing the checkout out in my 
> pipeline script and polling off on the job. I think I now understand what 
> needs to be done for this to work the way I intended. I will try and report 
> back if I encounter any issues. The option "Don't trigger on commit 
> notifications" also makes more sense now.
>
> On Saturday, September 24, 2016 at 8:49:37 AM UTC-7, Indra Gunawan 
> (ingunawa) wrote:
>>
>> If you do not want the pipeline to be triggered at all by commits to 
>> RepoB where the pipeline script exists then remove the Poll SCM in the 
>> pipeline job.
>> In the pipeline job, you configured “Pipeline script from SCM” and 
>> specified RepoB as location for the pipeline script.  The "Poll SCM” 
>> section will poll RepoB not RepoA.  Therefore, remove “Poll SCM”.
>> Don’t tell me you choose “Multiple SCM” one for RepoB and one for RepoA.  
>>
>> Your pipeline script will do the checkout of RepoA not using pipeline job 
>> definition to define RepoA to checkout.
>>
>> If the SCM chosen is “Git” the Pipeline’s “Pipeline script from SCM” 
>> reuse Git Plugin and "Don't trigger a build on commit notifications” is the 
>> same option in “Additional Behaviours” like other job using Git plugin.
>> You see the ? Of the option, it says :
>>
>> "If checked, this repository will be ignored when the notifyCommit-URL is 
>> accessed regardless of if the repository matches or not.”
>>
>>
>> notifyCommit is this: 
>> http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/
>> Basically you setup a post-receive git hook on the git remote repository 
>> side to push notification to Jenkins.
>> Are you using this or not?
>>  
>> Enabling "Don't trigger a build on commit notifications” means the build 
>> won’t trigger even if notifyCommit is received.
>>
>>
>>
>>
>>
>> From: <jenkins...@googlegroups.com> on behalf of Cyril <
>> cyril....@gmail.com>
>> Reply-To: "jenkins...@googlegroups.com" <jenkins...@googlegroups.com>
>> Date: Friday, September 23, 2016 at 5:43 PM
>> To: Jenkins Users <jenkins...@googlegroups.com>
>> Cc: ingunawa <ingu...@cisco.com>
>> Subject: Re: Jenkins builds being triggered despite ³Don't trigger a 
>> build on commit notifications²
>>
>> I didn't think about that option and it sounds like this should work 
>> exactly like I need it to be. Thanks for the suggestion. 
>>
>> I would still like to know what "Don't trigger a build on commit 
>> notifications" is supposed to do.
>>
>> On Friday, September 23, 2016 at 5:35:27 PM UTC-7, Indra Gunawan 
>> (ingunawa) wrote: 
>>>
>>> Or create old-style job configured to trigger on polling of repoA and it 
>>> will trigger the pipeline job as “Trigger/call builds on other projects” 
>>> build step.
>>>
>>>
>>> From: <jenkins...@googlegroups.com> on behalf of Cyril <
>>> cyril....@gmail.com>
>>> Reply-To: "jenkins...@googlegroups.com" <jenkins...@googlegroups.com>
>>> Date: Friday, September 23, 2016 at 2:57 PM
>>> To: Jenkins Users <jenkins...@googlegroups.com>
>>> Subject: Jenkins builds being triggered despite “Don't trigger a build 
>>> on commit notifications”
>>>
>>> I have a Pipeline job that checkouts a git repository (let's call is 
>>> "repoA") and passes it to some other downstream jobs for further 
>>> processing. The job's script is stored in a different git repo (let's call 
>>> it "repoB"). This job is configured with the "Poll SCM" option so that any 
>>> changes to repoA will trigger it. In the pipeline section, I have selected 
>>> the "Pipeline script from SCM" option and configured it to get the pipeline 
>>> script from the master branch of repoB. I have also added the option "Don't 
>>> trigger a build on commit notifications". The behavior that I'm expecting 
>>> is that any changes pushed to repoA would trigger the job, and any changes 
>>> to repoB would not trigger the job. Yet, when I push a change to repoB, the 
>>> job is triggered.
>>>
>>>
>>> I don't know if this is a bug, or if I'm missing something. I don't want 
>>> the job to be triggered when I make changes to the scripts. I only want it 
>>> to be triggered when a change is pushed to the repo that the script does a 
>>> checkout on.
>>>
>>>
>>> I am running Jenkins 2.7.4. My master Jenkins is running on Ubuntu 
>>> server 16.04.1 LTS. All my Jenkins plugins are up to date.
>>>
>>> -- 
>>> 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-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/eb6a4d98-6686-46f6-a411-cc60308f76d3%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/eb6a4d98-6686-46f6-a411-cc60308f76d3%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> 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-use...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/77731fe9-486f-457b-a6e5-503259bdb37a%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/77731fe9-486f-457b-a6e5-503259bdb37a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/e7b732f7-84b0-48e9-9255-9a63305a2152%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to