-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
-
lockable-resources 1.11
My CI server has multiple executors and multiple android devices attached to it. Each executor can perform either android or linux build. If android build is being performed, a test must be also performed on the device. To ensure unique access to specific android device, I use lockable resources plugin to "lock" the device.
However, in order to check if device1 is in use and then use device2, I am currently relying on custom locking logic (manually keeping lock files). It would be ideal if lockable resources plugin would have an option to enter the lock block if any of the listed resources can be acquired (and provide which resource was required).
For example:
lock_any( [ 'device1', 'device2', 'device3' ] ) { acquired_device -> // run tests on ${acquired_device} }
What you are looking for is the label property. You'll have to configure the resources with a label (e.g. device) and use
to get the name of the locked resource you ll have to approve several apis, but currently this is the only way until
JENKINS-40997is solved.