I am trying to move my jobs from freestyle to use a single pipeline from SCM, where each job has has specific parameters.
I am using Lockable Resources plugin in the freestyle jobs. This works great as the job enters the build queue and waits until resources are available:
(pending—Waiting for resource instances [resource1, resource2])
With pipeline to lock a resource lock() is used, but the job will begin running and take up an executor slot while it waits for the resource and make it impossible to have a reasonable timeout.
How can I replicate the behavior of lockable resources from freestyle job with a pipeline?