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

Limit number of builds for 'Execute concurrent builds' (limit total concurrent, and limit per-slave concurrent)

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      I think it would be useful to limit the maximum number of builds of the same job.
      Otherwise it could happen easily that all your executors are blocked by one single job.

          [JENKINS-5083] Limit number of builds for 'Execute concurrent builds' (limit total concurrent, and limit per-slave concurrent)

          In addition to the original limit reques: total number of concurrent builds (the original request),
          I would like to see an additional limit: total number of concurrent builds per slave.

          This is to handle a specific requirement I have: for some of my jobs, I can run builds concurrently on different machines, but I cannot have builds running concurrently on the same machine.

          At the moment, the way I achieve this is by only having one executor per slave, but that imposes a stronger restriction that I really need. Having a concurrent-per-machine limit would meet my requirements exactly.

          Matthew Webber added a comment - In addition to the original limit reques: total number of concurrent builds (the original request), I would like to see an additional limit: total number of concurrent builds per slave. This is to handle a specific requirement I have: for some of my jobs, I can run builds concurrently on different machines, but I cannot have builds running concurrently on the same machine. At the moment, the way I achieve this is by only having one executor per slave, but that imposes a stronger restriction that I really need. Having a concurrent-per-machine limit would meet my requirements exactly.

          mdonohue added a comment -

          The Port Allocator plugin will do what you want if you pick a fixed port. Ports are allocated per slave, so only one would be able to proceed per slave.

          mdonohue added a comment - The Port Allocator plugin will do what you want if you pick a fixed port. Ports are allocated per slave, so only one would be able to proceed per slave.

          Andrew Bayer added a comment -

          I've released a plugin to do this - it works with 1.360 of Hudson and later: http://wiki.jenkins-ci.org/display/JENKINS/Throttle+Concurrent+Builds+Plugin

          Andrew Bayer added a comment - I've released a plugin to do this - it works with 1.360 of Hudson and later: http://wiki.jenkins-ci.org/display/JENKINS/Throttle+Concurrent+Builds+Plugin

            abayer Andrew Bayer
            kutzi kutzi
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: