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

Use stage as a resource lock

    XMLWordPrintable

Details

    • New Feature
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Duplicate
    • pipeline
    • None

    Description

      My use case is users launching multiple jobs that use a lot of server bandwidth, so I would prefer to do something that limits the number of stages running concurrently similar to:

      stage 'start'
      stage name: 'bandwidth-hog', concurrency: 5, resourceLock: true
      //bandwidth hogging code
      stage 'finish'
      

      However, I can't have newer jobs pre-empt older jobs, they should just be queued up. Of course, this could be a new step as well. Hopefully this helps others as well!

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            stage is not designed for this use case; a separate step would be more appropriate.

            jglick Jesse Glick added a comment - stage is not designed for this use case; a separate step would be more appropriate.

            People

              jglick Jesse Glick
              anshuarya Anshu Arya
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: