-
Improvement
-
Resolution: Fixed
-
Major
-
None
The current implementation of Pipeline lock step allows to block a single resource.
It should be extended to cover all the functionality of the plugin (applicable to non-freestyle jobs) such as blocking resources by label or request a lock for N resources.
The DSL must be something like this:
lock (resources: ['resource1', 'resource2']) { ... execution block ... }
or
lock (label: 'my-resources') {
... execution block ...
}
The behavior of the label parameter would be equivalent to:
lock (resources: ['resource3', 'resource4']) { // if both resource3 and resource4 are labeled as 'my-resources' ... execution block ... }
- is duplicated by
-
JENKINS-38165 Support lockable resource labels in the pipeline
-
- Closed
-
- is related to
-
JENKINS-30269 Add workflow support for resource locking
-
- Resolved
-
-
JENKINS-34273 Extend quantity configuration to Pipeline lock step
-
- Resolved
-
- links to
amuniz
Hi! Nice to see this merged.
Looking at the merged content, I can't seem to find any pipeline syntax for actually knowing what resource was locked.
Specifically the proposed syntax from PR36 above: ", variable: 'MY_VAR'" is missing.
Our use case is that we wan't to specify a label containing node names for legacy builders that can't run the slave.jar (java7) anymore. We wan't to lock a resources (host name) from he label and then ssh to that machine any execute some build steps. This works with the FreestyleJob functionality of #Reserved resources variable name". Any thought of adding this to pipeline?