Gerrit Trigger Plugin - Removing Superseeded Builds

16 views
Skip to first unread message

James Pascoe

unread,
Apr 10, 2016, 3:47:57 PM4/10/16
to Jenkins Users
Hi everybody,

Apologies if this has been answered before, but I was wondering if somebody could help me with the following.

I am using Jenkins v1.617 with Gerrit trigger v2.18.0. My setup uses 'builder' jobs which are triggered by Gerrit events (typically patch-set creations). When a builder job is invoked, it uses the Git plugin to download some code, builds it and then Jenkins archives the artifacts and triggers a 'runner' job. Each runner job is tasked with unpacking the artifacts, pushing the binaries to a piece of test hardware, running a suite of tests, collecting the results and then posting them back to Gerrit. This is all ok, but the test cycle takes 35-45 minutes to run on the hardware. Because of this, I was wondering if there was a way for the Gerrit plugin (or otherwise) to delete builds from the build queue that have been superseded. In particular, I often see that a patch-set is pushed (which triggers a build) only to be followed by a second patch-set which is pushed a few minutes later. Is there any way to automatically cancel the builds associated with the first? Please note, that I am physically limited by the amount of test hardware that I have - I can not simply increase the number of slaves to cope with the extra runs.

Thanks in advance. BTW, one person did send me a reply (a while back) saying that this functionality had been added to the Gerrit plugin in version 2.15.0. If this is the case, would somebody please explain how I enable or use it, as this is not clear to me.

Many thanks and have a good evening,

James 
Reply all
Reply to author
Forward
0 new messages