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

Resource list stored in env variable empty when label is used in locking

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins 2.89.4
      Lockable resources 2.1

      When using lock from jenkinsfile and using label, then the list stored to env variable is empty.  Lock seemed to work, but in my use case I need to have access to the fields of locked resource. Unfortunately there does not seem to be any easy way to access locked resources name and details, except via the env variable. 

      I tried locking with resources name and then list was populated properly, but this is not an option when the lock is used to monitor access to multiple resources of same type and there is a need to have the name and details field of the resource.

       

       

          [JENKINS-49623] Resource list stored in env variable empty when label is used in locking

          2.2 ships JENKINS-40997 which should cover your use case. Actually I don't know what variable are you talking about as the feature did not exist before.

          Antonio Muñiz added a comment - 2.2 ships JENKINS-40997 which should cover your use case. Actually I don't know what variable are you talking about as the feature did not exist before.

          Should have been fixed in 2.7

          Tobias Gruetzmacher added a comment - Should have been fixed in 2.7

            tgr Tobias Gruetzmacher
            jmyllyla Janne Myllyla
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: