I have a bunch of jobs that I need to throttle so that only one of them is running at any given time. On our old Jenkins instance that we're migrating away from, we had been using throttle-concurrent-builds combined with it's categories feature to achieve this. We've attempted to replicate this, however, the difference now is that we're using job-dsl to generate the jobs, and using Jenkinsfiles to have our pipelines in code.
On our new Jenkins instance however, this doesn't seem to be fully working. We are observing the following behaviour:
Imagine there are 3 jobs, Jobs A through C
We have Job A that is currently running. While Job A is running, any other jobs (that is B and C), get queued as expected. Once Job A finishes, jobs B and C get scheduled straight away so that now both jobs are running.
This is obviously not desired behaviour, and we only need to run a single job at a time.
I've had a look through the config.xml that gets generated on our new instance, and compared it with our old instance and below is the diff: Couple of notes, the parameter `PIPELINE_MODE` has been removed on our new instance, but from looking at the code for the plugin, it looks to me like `paramsToUseForLimit` attribute is ignored when `limitOneJobWithMatchingParams` is set to false. Furthermore, I'm not quite sure where `DisableConcurrentBuildsJobProperty` comes from, and I'm not really sure if this is what could be causing it. Our Job DSL (which is pretty much the same for all jobs): This looks to me like a bug, but I'm not entirely sure.
Steps to reproduce the issue have been added as a comment.