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

JobDSL API not supporting current throttle concurrent builds parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • None

      The limitOneJobWithMatchingParams checkbox is un-checkable from jobDSL.

       

      The current JobDSL API for throttleConcurrentBuilds is this:
       (from jenkinsurl/plugin/job-dsl/api-viewer/index.html#method/javaposse.jobdsl.dsl.jobs.WorkflowJob.throttleConcurrentBuilds
      throttleConcurrentBuilds 

      { * // Throttles this project as part of one or more categories.[categories|http://localhost:8080/plugin/job-dsl/api-viewer/index.html#path/javaposse.jobdsl.dsl.jobs.WorkflowJob.throttleConcurrentBuilds-categories](List<String> categories) * // Sets the maximum number of concurrent builds of this project (or category) to be allowed to run per node.[maxPerNode|http://localhost:8080/plugin/job-dsl/api-viewer/index.html#path/javaposse.jobdsl.dsl.jobs.WorkflowJob.throttleConcurrentBuilds-maxPerNode](int maxPerNode) * // Sets the maximum number of concurrent builds of this project (or category) to be allowed to run at any one time, across all nodes.[maxTotal|http://localhost:8080/plugin/job-dsl/api-viewer/index.html#path/javaposse.jobdsl.dsl.jobs.WorkflowJob.throttleConcurrentBuilds-maxTotal](int maxTotal) * // Disables the throttle.[throttleDisabled|http://localhost:8080/plugin/job-dsl/api-viewer/index.html#path/javaposse.jobdsl.dsl.jobs.WorkflowJob.throttleConcurrentBuilds-throttleDisabled](boolean throttleDisabled = true) * // If set, throttles Matrix master builds.[throttleMatrixBuilds|http://localhost:8080/plugin/job-dsl/api-viewer/index.html#path/javaposse.jobdsl.dsl.jobs.WorkflowJob.throttleConcurrentBuilds-throttleMatrixBuilds](boolean throttleMatrixBuilds = true) * // If set, throttles Matrix configuration builds.[throttleMatrixConfigurations|http://localhost:8080/plugin/job-dsl/api-viewer/index.html#path/javaposse.jobdsl.dsl.jobs.WorkflowJob.throttleConcurrentBuilds-throttleMatrixConfigurations](boolean throttleMatrixConfigurations = true)}

       
      The current throttle concurrent builds plugin has properties (from config file)

      <hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="throttle-concurrents@2.8">

            <maxConcurrentPerNode>0</maxConcurrentPerNode>

            <maxConcurrentTotal>0</maxConcurrentTotal>

            <categories class="java.util.concurrent.CopyOnWriteArrayList"/>

            <throttleEnabled>true</throttleEnabled>

            <throttleOption>project</throttleOption>

            <limitOneJobWithMatchingParams>true</limitOneJobWithMatchingParams>

            <paramsToUseForLimit></paramsToUseForLimit>

          </hudson.plugins.throttleconcurrents.ThrottleJobProperty>

      The limitOneJobWithMatchingParams checkbox is un-checkable from jobDSL.

       

      Probably due to https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/toplevel/ThrottleConcurrentBuildsContext.groovy not being updated since 2017, or reflected from the plugin.

            jamietanna Jamie Tanna
            mmcanerin Mark McAnerin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: