Jenkins disableConcurrentBuilds have multiple builds in queue

  Kiến thức lập trình

In our pipeline we want to execute the builds 1 by 1, so we do not want to run multiple builds of one specific pipeline at the same time, for all other pipelines it is no problem.
We added options { disableConcurrentBuilds() } like:

pipeline {
    agent any
    options { disableConcurrentBuilds() }

When we trigger multiple builds, only 1 build is running at the time as excpected. However there is only 1 build queued (we can see this in blue ocean) after the 1st build. So if we start 10 builds after each other, build 1 is executed right away, build 2 is queued, all other builds are not queued and are never started.
All builds we start should be executed 1 by 1, none should be skipped.
How can we queue multiple builds?

LEAVE A COMMENT