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

Unreserve doesn't set environment variable

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The manual reserve feature doesn't work well with the pipeline variable feature. When a user unreserves a resource and the plugin assigns the resource immediately to a queued build, the environment variable won't be correctly set.

      In LockableResourceManager.unreserve, there is a LockStepExecution.proceed call at the end with the variable left null. I have no idea how to retrieve a singular variable to use at this point in the code. 

        Attachments

          Issue Links

            Activity

            Hide
            famod Falko Modler added a comment - - edited

            Same here, Jenkins ver. 2.138.2 and lockable-resources 2.3.

            This results in a failed build due to groovy.lang.MissingPropertyException: No such property: [...] for class: groovy.lang.Binding

            PS: First, I was irritated by this closed GitHub ticket because I thought it was the same scenario, but it's not!
            That ticket adressed one build waiting for another (to free up the resource), but here we have a job waiting for a manually reserved resource.

            Show
            famod Falko Modler added a comment - - edited Same here, Jenkins ver. 2.138.2 and lockable-resources 2.3. This results in a failed build due to groovy.lang.MissingPropertyException: No such property: [...] for class: groovy.lang.Binding PS: First, I was irritated by this closed GitHub ticket because I thought it was the same scenario, but it's not! That ticket adressed one build waiting for another (to free up the resource), but here we have a job waiting for a manually reserved resource.
            Hide
            nwegner Niels Wegner added a comment -

            As mentioned in JENKINS-50176 this bug will be covered by that bugfix (PR#117) as well

            Show
            nwegner Niels Wegner added a comment - As mentioned in  JENKINS-50176  this bug will be covered by that bugfix (PR#117) as well
            Hide
            famod Falko Modler added a comment -

            Thanks for the pointer, Niels Wegner!

            Show
            famod Falko Modler added a comment - Thanks for the pointer, Niels Wegner !

              People

              • Assignee:
                Unassigned
                Reporter:
                stevenfoster Steven Foster
              • Votes:
                5 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: