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

Limit concurrent builds for 1 MultiBranch project

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am currently running the latest version of the Pipeline plugin and i have created a multi-branch job. Everything is running fine on my Jenkinsfile but i would like to limit only 1 concurrent build for my entire multi-branch project. I see that you can set the option individually for the sub-sequent (branch) job but i would like to know if there is a way to limit it for the entire folder.

        Attachments

          Issue Links

            Activity

            Hide
            johannsig Jóhann Sigurðsson added a comment - - edited

            Has this been resolved? I don't want two pipeline builds to each occupy an executor at the same time

            Show
            johannsig Jóhann Sigurðsson added a comment - - edited Has this been resolved? I don't want two pipeline builds to each occupy an executor at the same time
            Hide
            johannsig Jóhann Sigurðsson added a comment - - edited

            For anyone so inclined, I came up with a workaround by:

            1. Limiting Master node executors to Pipeline builds
            2. Creating a local slave agent and hooking it up to Jenkins to take care of other jobs

            Declarative script example:

            agent {
              label {
                label "Master"    
              }
            }
            

             

             

            Show
            johannsig Jóhann Sigurðsson added a comment - - edited For anyone so inclined, I came up with a workaround by: Limiting Master node executors to Pipeline builds Creating a local slave agent and hooking it up to Jenkins to take care of other jobs Declarative script example: agent { label { label "Master" } }    
            Hide
            petersbattaglia Peter Battaglia added a comment -

            Is there a timeline for a fix for this issue – or a reasonable workaround?

            Show
            petersbattaglia Peter Battaglia added a comment - Is there a timeline for a fix for this issue – or a reasonable workaround?
            Hide
            jglick Jesse Glick added a comment -

            Use lock (outside node!).

            Show
            jglick Jesse Glick added a comment - Use lock (outside node !).
            Hide
            qhartman Quentin Hartman added a comment -

            I agree that the lock, even outside the context of node isn't really a solution here.

             

            I have two builds, A and B. Build A requires that it is build one at a time on a node. Build B does not. If what I've seen is correct, a resource locked by build A will prevent build B from running on that resource as well. This is not what I want.

            Am I missing something? There's no reason to waste the time waiting for A to finish when I have B builds waiting to go.

            Show
            qhartman Quentin Hartman added a comment - I agree that the lock, even outside the context of node isn't really a solution here.   I have two builds, A and B. Build A requires that it is build one at a time on a node. Build B does not. If what I've seen is correct, a resource locked by build A will prevent build B from running on that resource as well. This is not what I want. Am I missing something? There's no reason to waste the time waiting for A to finish when I have B builds waiting to go.

              People

              • Assignee:
                Unassigned
                Reporter:
                zikphil Philippe Labat
              • Votes:
                18 Vote for this issue
                Watchers:
                22 Start watching this issue

                Dates

                • Created:
                  Updated: