| When using the lockable resources plugin with pipelines, nothing really works as it should. I have a lock that appears as follows:
lock("foo_${env.NODE_NAME}") {
sh 'do something on node in my current context'
}
The intent is to be able to run many jobs on one machine, but only lock critical sections on a node-by-node basis, for things that require singleton resources on the node. However, as soon as my job starts waiting, it releases its executor. If it doesn't wait, it still releases the executor but continues executing. This can cause jobs to execute when they shouldn't be, and can lose access to nodes that are necessary once out of the critical section. |