Re: Groovy pipeline to lock a resource on a node that is online

2020-10-06 Thread 'monger_39' via Jenkins Users
today I gave it a try to:* add a check within the lock { ... } block to see if the derived node is online. If so, I throw an exception,   and thus end up in the retry(). Unfortunately, upon the next try, I just get again the resource for the    node that was offline. After 3 retries, my script

Groovy pipeline to lock a resource on a node that is online

2020-05-27 Thread 'monger_39' via Jenkins Users
Hi, I have several jobs that require exlusive access to some resource of which a given agent node can have multiple, but limited to some maximum number which is less than nr of executors of the agent. We solve this by using the Lockable Resources plugin. We define a resource per what is availabl