| This plugin has really helped in the scenario of testing client-server, or cloud applications where we want to lock a deployment across multiple test jobs, however we end up duplicating configuration between lockable resources and node. A really useful improvement to lockable resources would be to choose the resource from online nodes in a pool represented by a node label. For example, I currently configure:
- node label "BACKEND_POOL" representing a pool of Jenkins nodes where I can deploy my applcation back end/services
- lockable resources "SERVICE_POOL" with the identical list
Now I have a pipeline like pseudocode:
stage("Build") {
build()
}
RESOURCE = get lockable resource from SERVICE_POOL
stage ("Deploy") {
node (RESOURCE) {
deploy()
}
stage ("Test1") {
node ("Test") {
Test1(server=RESOURCE)
}
}
stage ("Test2") {
node ("Test") {
Test2 (server=RESOURCE)
}
}
However, now I am maintaining the same list of resources in both the node label/pool and the lockable resource pool. This leads to issues like nodes being locked for deployment even though they are offline, someone adding or deleting a resource from one pool but not the other, or someone taking a node offline in one place but not the other. Lockable resources should be able to lock a resource from online nodes in a node pool, and keep it locked across multiple stages that require using that resource but not as a node. |