Lock resources immediately releases them and locked resources variable is not created

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      pipeline snippet below was working on 3.303
      After upgrade to 2.387.3, the locked resources are immediately released and not even the first line in the block is reached. Is the lock() crashing?

      lock(label: "LABEL_A", quantity: 3 variable: 'LOCKED_RESOURCES',
             extra: [[label: 'LABEL_B',quantity: 2]])
          {
          // this line is not printed and resources are inmedately released
          println(">>>>>>>>>>>>>>>>> after  lock")
          do_pipeline()
          } 
      13:50:48  Trying to acquire lock on [{Label: LABEL_A, Quantity: 3},{Label: LABEL_B, Quantity: 2}]
      13:50:48  Lock acquired on [{Label: LABEL_A, Quantity: 3},{Label: LABEL_B, Quantity: 2}]
      13:50:48  [Pipeline] {
      13:50:48  [Pipeline] }  // println and do_pipeline should happen here
      13:50:48  Lock released on resource [{Label: LABEL_A, Quantity: 3},{Label: LABEL_B, Quantity: 2}]
      13:50:48  [Pipeline] // lock
      

            Assignee:
            Unassigned
            Reporter:
            carlos novo
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: