Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Hudson job polling tips

On Thu, Jun 12, 2014 at 7:59 PM, Thanh Ha <thanh.ha@xxxxxxxxxxx> wrote:
Hi Everyone,

Occasionally we see Hudson jobs configured for polling which are far too aggressive by polling every minute. If your polling job looks like this "* * * * *" it is configured to poll every minute. You should instead consider configuring your job using the Hudson built in @hourly, @daily, etc... which will set up a more reasonable polling interval. However if you do require a smaller polling interval consider setting it to 5, 10 or 15 minutes to give your job a chance to finish polling from the last polling attempt instead of polling every minute.

For example:

*/5 * * * *   # for 5 minutes
*/10 * * * *  # for 10 minutes
*/15 * * * *  # for 15 minutes

The Jenkins Gerrit Trigger plugin also supports triggering builds when a change in code review is submitted
(Gerrit event Change Merged) or when a ref is updated in case a change is pushed directly without code review
(Gerrit event Ref Updated). This way, if your project is using Gerrit, you can completely get rid of polling and
instead trigger the builds through Gerrit stream events. You also gain faster turnarounds since builds
are triggered immediately after a change reaches a branch. We are using this feature here at SAP.

Unfortunately this feature seems not to be available (yet ?) with the Hudson Gerrit Trigger plugin which seems
to be wildly outdated  (last release Oct 2012) compared to the Jenkins version (last release April 2014).
I tried to use these events for JGit and EGit builds but it seems the Hudson plugin is too old to support
this. I filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=437313 to ask the Hudson team if they could fix that.

--
Matthias

Back to the top