| This ticket is to allow specification of limitOneJobWithMatchingParams and paramsToUseForLimit parameters in hudson.plugins.throttleconcurrents.ThrottleJobProperty. Currently this is not possible, and users are required to use the configuration block as a workaround:
concurrentBuild(true)
throttleConcurrentBuilds {
// Tune this number to control the total number of simultaneous
// retirements across all environments. This does not accurately
// throttle per environment, but we expect the vast majority of
// retirement requests to come in through prod, so it's good enough for
// now.
maxTotal(4)
}
configure { project ->
project / 'properties' / 'hudson.plugins.throttleconcurrents.ThrottleJobProperty' <<
'paramsToUseForLimit'('ENVIRONMENT,RETIREMENT_USERNAME')
project / 'properties' / 'hudson.plugins.throttleconcurrents.ThrottleJobProperty' <<
'limitOneJobWithMatchingParams'('true')
}
Full example here: https://github.com/edx/jenkins-job-dsl/blob/master/platform/jobs/RetirementJobs.groovy#L93-L107 I think the file where this could be modified is here: https://github.com/jenkinsci/throttle-concurrent-builds-plugin/blob/master/src/main/java/hudson/plugins/throttleconcurrents/ThrottleJobProperty.java#L78-L79 |