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

Thottle Concurrent Builds - enforce start interval/delay between running builds.

      We have a test job which takes an hour to run.
      I have enabled concurrent builds and use throttle concurrent build plugin to restrict to one build per node and limit to only 3 concurrent builds at a time.

      Current behaviour during a busy period:

      1:00 - build triggered - starts building #1
      1:05 - build triggered - starts building #2
      1:10 - build triggered - starts building #3
      1:15 - build triggered - #4 waits in queue
      1:25 - build triggered - merged into #4, waits in queue
      1:30 - build triggered - merged into #4, waits in queue
      1:50 - build triggered - merged into #4, waits in queue
      2:00 - build #finished, build #4 starts

      no other builds can start until the first build finishes at 2:00

      Desired Behaviour:
      If no builds are currently running and a build is triggered, I want it to start as soon as possible.
      When the next build is triggered, if there is still a build running, I want it to wait a specified number of minutes, eg 20 minutes, after the previous build started executing.

      1:00 - build triggered - starts building #1
      1:05 - build triggered - #2 waits in queue
      1:10 - build triggered - merged into #2, waits in queue
      1:15 - build triggered - merged into #2, waits in queue
      1:20 - 20 minute interval from last build started, build #2 starts executing
      1:25 - build triggered - #3 waits in queue
      1:30 - build triggered - merged into #3, waits in queue
      1:40 - 20 minute interval from last build started, build #3 starts executing
      1:50 - build triggered - #4 waits in queue
      2:00 - build #1 finished, 20 minute interval from last build started, build #4 starts executing

      This will allow a build to start as soon as possible if there are no other builds running but also allow staggered builds starting every 20 minutes during a busy period.

      It should only delay if the last build is still running, if the last build failed we would not want to delay for 20 minutes to retry!

      Hopefully that makes some sense.
      Geoff

          [JENKINS-23368] Thottle Concurrent Builds - enforce start interval/delay between running builds.

          Geoff Cummings added a comment - Hi, Pull request submitted: https://github.com/jenkinsci/throttle-concurrent-builds-plugin/pull/21 thanks Geoff

            gcummings Geoff Cummings
            gcummings Geoff Cummings
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: