Running only one instance of a job

6 views
Skip to first unread message

Paxton, Darren

unread,
Oct 14, 2016, 11:07:14 AM10/14/16
to jenkins...@googlegroups.com

Hi

 

I’ve got a lot of jobs that rebuild docker images – part of this involves a security scan of those images to see if there are any CVEs contained within.

 

I’m trying to figure out a workflow where I can take the failure of the scan to force a resync from our upstream vendor for packages however we have multiple image jobs. 

 

I’d like to implement kicking off a resync on the failure of the first of those jobs and for each subsequent job, it checks if the sync job is running and if so, it silently skips by. At first I thought setting a conditional build on the sync job and putting a file in place so that it wouldn’t run if it sees that file, but subsequent runs of the same job just get queued and so would likely succeed.

 

Does anyone have any offerings or advice on a plugin that would check the running jobs in the queue and if they match a pattern, they either abort the job or something else? Build blocker almost looked like what I require however if I understand it correctly, it would only block until the job leaves the queue and would then be released.

 

Any help greatly appreciated.

Reply all
Reply to author
Forward
0 new messages