Jenkins Pipeline throttle other jobs
问题 I'm trying to lock some other jobs from runing when a jenkins pipeline is running, I've been trying to use the exclusion-plugin or the throttle-concurrent-builds-plugin with this kind of structure : node(){ stage "test" allocate('test') sleep time: 15, unit: 'MINUTES' sh "echo 'yes'" } @NonCPS def allocate(String resource){ throttle = new hudson.plugins.throttleconcurrents.ThrottleJobProperty( maxConcurrentPerNode=1, maxConcurrentTotal=1, categories = [resource], throttleEnabled=true,