You just may need to use a different hook.

Multibranch listens for the hooks.

If you used Git as the SCMSource then that hook is exactly the one to use
as it sends the events to the SCM API:
https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/GitStatus.java#L159-L162

If you used GitHub as the SCMSource then there is a special github hook
that does what you want.

On 28 September 2017 at 11:19, Eric Tan <erictan...@gmail.com> wrote:

> Stephen,
>
> Thanks for the reply.
> Yes, it is a multibranch project.
> I was trying to use Git hook (eg. post-commit) to notify Jenkins to do a
> build and this hook requires the "Poll SCM".
>
> curl http://localhost:8080/git/notifyCommit?url=...
>
> I assume this approach will not work. Will use the freestyle project
> instead.
>
>
> On Thursday, 28 September 2017 18:00:42 UTC+8, Stephen Connolly wrote:
>>
>> If this is a multibranch project (smells like it) you do not configure
>> polling for each branch. The single indexing of the parent multibranch
>> provides the same as polling *while* simultaneously reducing the load on
>> the SCM Server (one scan vs N polling)
>>
>> On Thu 28 Sep 2017 at 06:31, Eric Tan <erict...@gmail.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> Using Jenkins 2.79.
>>>
>>> Logged in as admin and navigate to Jenkins > MyJob > master (branch).
>>>
>>> Trying to enable the "Poll SCM" checkbox but there is only view only
>>> mode under View Configuration.
>>>
>>> How do I go about to enable edit mode to select "Poll SCM" checkbox?
>>>
>>> I understand that the older versions have the "Poll SCM" checkbox under
>>> Jenkins > MyJob > Configure, but it is no longer there in version 2.79.
>>>
>>> Thanks,
>>> Eric
>>>
>>> --
>>> 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/ms
>>> gid/jenkinsci-users/96245760-1987-4e4b-9c1f-744a023207f7%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/96245760-1987-4e4b-9c1f-744a023207f7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> Sent from my phone
>>
> --
> 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/5d874b28-8f26-4639-916d-a0873e50cdb1%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/5d874b28-8f26-4639-916d-a0873e50cdb1%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/CA%2BnPnMxHaCXC1uqcwnKG4X5tj78ewA-n_2Cwc%2BmXbjGu-HMzAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to