Polling in Jenkins

41 views
Skip to first unread message

Hector Magnanao

unread,
Feb 16, 2016, 1:06:56 PM2/16/16
to Jenkins Users
I'm using Jenkins 1.625.2

How do I setup polling in Jenkins so that my build will execute whenever a file is checked in ? I tried to setup polling but when I choose Poll SCM, it asked for a schedule.  Do I have to put in a schedule or is there a way to setup polling without schedule ? I want my build to execute whenever a file is checked in.

Daniel Beck

unread,
Feb 16, 2016, 1:26:58 PM2/16/16
to jenkins...@googlegroups.com
If you're polling, you need to define a schedule -- Jenkins needs to know how often to poll, after all. This can be as simple as '* * * * *', which means "every minute".

Consider looking into (SCM specific) post-commit hooks, those notify Jenkins of changes immediately, and don't require Jenkins to poll all the time (which as you can imagine, doesn't scale well).

On 16.02.2016, at 19:06, Hector Magnanao <hector....@sap.com> wrote:

> I'm using Jenkins 1.625.2
>
> How do I setup polling in Jenkins so that my build will execute whenever a file is checked in ? I tried to setup polling but when I choose Poll SCM, it asked for a schedule. Do I have to put in a schedule or is there a way to setup polling without schedule ? I want my build to execute whenever a file is checked in.
>
> --
> 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/533d2bd1-f12b-44d9-9f66-bd137910f9dc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Hector Magnanao

unread,
Feb 16, 2016, 3:43:30 PM2/16/16
to Jenkins Users, m...@beckweb.net
I tried polling with a schedule like H/10 * * * *  which means "every 10 minutes".  But polling doesn't seem to work. 

How can I setup a post-commit hook to notify Jenkins of checkins. ?

John Mellor

unread,
Feb 16, 2016, 3:48:56 PM2/16/16
to jenkins...@googlegroups.com

Hector stated:

Ø  I tried polling with a schedule like H/10 * * * *  which means "every 10 minutes".  But polling doesn't seem to work. 

 

H/10 * * * * should give you a pooling cycle of about every 6 minutes, not 10.  I use something similar because my current git repo does not allow me to insert a hook script.  It works correctly, so I suspect your build triggering problem is elsewhere.

Hector Magnanao

unread,
Feb 16, 2016, 5:02:48 PM2/16/16
to Jenkins Users, John....@esentire.com
Jenkins is telling me that I have too many threads stuck. 

Victor Martinez

unread,
Feb 16, 2016, 5:17:40 PM2/16/16
to Jenkins Users, John....@esentire.com
Probably there are more posts about using pull rather than polling:
Reply all
Reply to author
Forward
0 new messages