Add support of throttling of the entire build in Declarative Pipeline

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

XMLWordPrintable

      So, I'm having this problem that I described in a similar bug for the lockable-resource plugin (JENKINS-45138). I said to myself, "oh, hey, I remember being able to throttle executions on a per-agent basis!"

      Imagine my surprise when I hit the documentation and find that throttle is only applicable inside a step.

      I need to acquire, use, and cleanup exclusive access to a resource on each agent. Will throttle work how I expect?

      step('foo') {
          throttle(['foo-label'])
          bat '... acquire the resource...'
          bat '... use the resource...'
      }
      post {
          always {
              bat '... cleanup the resource...'
          }
      }
      

        1. set-job-properties.png
          12 kB
          Anthony Mastrean
        2. throttle-entire-job.png
          116 kB
          Anthony Mastrean
        3. image-2018-09-21-18-20-12-512.png
          49 kB
          Sharad Holani
        4. image-2020-11-27-16-20-28-161.png
          10 kB
          Mickael Thierry
        5. image-2020-11-27-16-20-42-543.png
          9 kB
          Mickael Thierry

            Assignee:
            Unassigned
            Reporter:
            Anthony Mastrean
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: