Deleting Builds from Build Queue when Superseded By Newer Patchsets

112 views
Skip to first unread message

James Pascoe

unread,
Dec 4, 2015, 9:48:00 AM12/4/15
to Jenkins Users
Hi Everybody,

I have been using Jenkins v1.617 to automatically run validation tests on three hardware platforms. So far, Jenkins has been very well received and I like it a lot.

I have a series of 'builder' jobs which are triggered with the Gerrit trigger plugin (v 2.13.0). I use the Git client plugin (v 1.17.0) to checkout the code and then build it with a script. On successful completion, the 'builder' jobs trigger 'runner' jobs which are tasked with the mechanics of running the code on the hardware, processing the results and posting them to Gerrit.

Each test run takes about 30 minutes on the hardware. During this time, it is very often the case that several newer patch-sets are pushed to Gerrit for a particular commit. So, my question is, Is there any automated way of removing builds from the build queue if a newer patch-set has been triggered?

Apologies if this has been asked before - I've noticed that a few people have worked around this issue by increasing the number of build slaves - however, I am limited by hardware availability and so don't have that option.

Many thanks for any help,

James




Daniel Beck

unread,
Dec 4, 2015, 9:56:44 AM12/4/15
to jenkins...@googlegroups.com
Someone on IRC recently wanted to limit the number of queue items for a job, so I wrote:

https://github.com/daniel-beck/fixed-fifo-queue-plugin

Could be close enough to what you need.

Completely unsupported.
> --
> 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/09f504c2-2475-45f4-8499-83ada4b30416%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

James Pascoe

unread,
Dec 4, 2015, 10:15:12 AM12/4/15
to jenkins...@googlegroups.com
Hi Daniel,

Thanks - that's a perfect starting point - much appreciated :-) !

I'll look at extending it to scan through the Gerrit patchset numbers and let you know how it goes.

Thanks again and have a good weekend,

James 

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/gmANl7O8h0E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/601339F5-9BA9-4EB4-9581-054293E3FDD4%40beckweb.net.

Baptiste Mathus

unread,
Dec 4, 2015, 11:59:06 AM12/4/15
to jenkins...@googlegroups.com

Pretty sure the Gerrit trigger has that very option, that is stopping previous build when a new patchset is submitted.

HTH

James Pascoe

unread,
Dec 4, 2015, 12:34:56 PM12/4/15
to jenkins...@googlegroups.com
Hi Baptiste,

Ah - thanks - yes, it looks like it was added in 2.14 and we are still using 2.13 :-) !

Thanks, I'll upgrade and try it.

Have a good weekend,

James

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/gmANl7O8h0E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4bg9BPy4HkEjA-e-6JuWsWu6bn52AkgaJ%2Bb_K3dVbdjg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages