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

Retrieve Names of Resources When Locking Multiple

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Labels:
      None
    • Environment:
      Jenkins 2.150.2
      Lockable Resources 2.5
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            ckaynor_vc Chris Kaynor added a comment -

            Upon further testing, it turns out this was actually caused by JENKINS-50176.

            Show
            ckaynor_vc Chris Kaynor added a comment - Upon further testing, it turns out this was actually caused by JENKINS-50176 .

              People

              • Assignee:
                tgr Tobias Gruetzmacher
                Reporter:
                ckaynor_vc Chris Kaynor
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: