Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62674

Retrieve Names of Resources When Locking Multiple


    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • Jenkins 2.150.2
      Lockable Resources 2.5

      When locking multiple resources using the quantity parameter (JENKINS-34268 and JENKINGS-34273), it would be very useful to be able to obtain the names of the locked resources such as via the "variable" parameter.

      Our specific use case comes from having development kits that we cannot directly run Jenkins on but are driven via network communication and generally fungible (grouped with different labels each of which is fungible). Most of our systems only need a single resource so the "variable" parameter works, however we are trying to get some tests running that require multiple resources working together. The exact number of resources needed will vary by test and thus should be a configurable parameter.

      We currently are trying a workaround of using a recursive function and closures to run multiple lock commands with quantity of 1 each time and accumulate a final list of all locked resources, however this is not a super pretty solution.

            tgr Tobias Gruetzmacher
            ckaynor_vc Chris Kaynor
            0 Vote for this issue
            1 Start watching this issue