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

Add ability to throttle number of concurrent builds of matrix configurations per node

      It would be extremely useful to be able to throttle the number of concurrent builds of matrix configurations that can take place on a given node. The reason for this is when you have a matrix project in which all subprojects share the same parent workspace data. It is possible then to run concurrent builds across separate nodes, but not on the same node.

      The specific use case I am running into is for building Android. I have a matrix project that defines configurations for each device I wish to build. Every sub-project shares the same android source tree to build off of, so concurrent builds are not possible on the same node as they would clobber each other, but concurrent builds on separate nodes would be fine.

          [JENKINS-13619] Add ability to throttle number of concurrent builds of matrix configurations per node

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions.java
          src/main/resources/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions/config.jelly
          http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/bdad9a686a8ecf66aad00d17b85388520e935b58
          Log:
          JENKINS-13619 - Display default values in multi-config checkboxes

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions.java src/main/resources/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions/config.jelly http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/bdad9a686a8ecf66aad00d17b85388520e935b58 Log: JENKINS-13619 - Display default values in multi-config checkboxes Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java
          http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/739c4a737841c822edae313a1081b6d9cdc91de9
          Log:
          JENKINS-13619 - Check configured options for multi-config throttling

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Conflicts:
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/739c4a737841c822edae313a1081b6d9cdc91de9 Log: JENKINS-13619 - Check configured options for multi-config throttling Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com> Conflicts: src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java
          http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/610834a0b68d5ce7489cfaa45193402ea5eb27cb
          Log:
          JENKINS-13619 - Committed missing changes

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Conflicts:
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/610834a0b68d5ce7489cfaa45193402ea5eb27cb Log: JENKINS-13619 - Committed missing changes Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com> Conflicts: src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions.java
          src/main/resources/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions/config.jelly
          http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/400e7e9f3c67b088e8664d7c89afd7ba70e11dba
          Log:
          JENKINS-13619 - Display default values in multi-config checkboxes

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions.java src/main/resources/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions/config.jelly http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/400e7e9f3c67b088e8664d7c89afd7ba70e11dba Log: JENKINS-13619 - Display default values in multi-config checkboxes Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java
          http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/6afbb76840be76864a464fbbb1ecf60ac497e13a
          Log:
          JENKINS-13619 - Check configured options for multi-config throttling

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/6afbb76840be76864a464fbbb1ecf60ac497e13a Log: JENKINS-13619 - Check configured options for multi-config throttling Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java
          http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/8962bbbf73909f7835af77bde391987c150a2fca
          Log:
          JENKINS-13619 - Committed missing changes

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Compare: https://github.com/jenkinsci/throttle-concurrent-builds-plugin/compare/c8280ad3ac3c...8962bbbf7390

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/8962bbbf73909f7835af77bde391987c150a2fca Log: JENKINS-13619 - Committed missing changes Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com> Compare: https://github.com/jenkinsci/throttle-concurrent-builds-plugin/compare/c8280ad3ac3c...8962bbbf7390

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleJobProperty.java
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions.java
          src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java
          src/main/resources/hudson/plugins/throttleconcurrents/Messages.properties
          src/main/resources/hudson/plugins/throttleconcurrents/ThrottleJobProperty/config.jelly
          src/main/resources/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions/config.jelly
          src/main/resources/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions/config.properties
          src/test/java/hudson/plugins/throttleconcurrents/ThrottleJobPropertyTest.java
          http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/abd999baf869d0bc598ed6fc522303c629117ed3
          Log:
          Merge pull request #18 from jenkinsci/throttle-matrix-configurations

          JENKINS-13619 - Throttle matrix configurations

          Compare: https://github.com/jenkinsci/throttle-concurrent-builds-plugin/compare/4fa0bb541fbb...abd999baf869

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml src/main/java/hudson/plugins/throttleconcurrents/ThrottleJobProperty.java src/main/java/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions.java src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java src/main/resources/hudson/plugins/throttleconcurrents/Messages.properties src/main/resources/hudson/plugins/throttleconcurrents/ThrottleJobProperty/config.jelly src/main/resources/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions/config.jelly src/main/resources/hudson/plugins/throttleconcurrents/ThrottleMatrixProjectOptions/config.properties src/test/java/hudson/plugins/throttleconcurrents/ThrottleJobPropertyTest.java http://jenkins-ci.org/commit/throttle-concurrent-builds-plugin/abd999baf869d0bc598ed6fc522303c629117ed3 Log: Merge pull request #18 from jenkinsci/throttle-matrix-configurations JENKINS-13619 - Throttle matrix configurations Compare: https://github.com/jenkinsci/throttle-concurrent-builds-plugin/compare/4fa0bb541fbb...abd999baf869

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - Attached the plugin package from https://jenkins.ci.cloudbees.com/job/plugins/job/throttle-concurrent-builds-plugin/33/org.jenkins-ci.plugins$throttle-concurrents/

          Oleg Nenashev added a comment -

          Marking as resolved (1.8.3). There will be several improvements in 1.8.4

          Oleg Nenashev added a comment - Marking as resolved (1.8.3). There will be several improvements in 1.8.4

          Ke Liu added a comment - - edited

          Sorry to re-surface such an old thread. I am trying to do exactly the same thing. I have a matrix build of N child jobs, and M nodes. Each node can only execute one child job at the same time, while child jobs on different nodes don't interfere with each other. Child jobs from different builds don't interfere with each other as long as they don't run on the same node.

          Is there any example that shows how this can be set up? Right now I observe multiple child jobs being scheduled on the same node. My current configuration (in groovy DSL) is like this (I deleted a bunch of unrelated stuff to make it clearer). Thanks.

           

           

          def numShards = 5
          matrixJob('XXXX') {
            description('XXXX')
            axes {
              text('SHARD', (0..(numShards - 1)).collect { it.toString() })
              label('slaves', "some-label")
            }
            concurrentBuild()
            throttleConcurrentBuilds {
              maxPerNode(1)
            }
            steps {
              shell('some command')
            }
          }
          

           

          Ke Liu added a comment - - edited Sorry to re-surface such an old thread. I am trying to do exactly the same thing. I have a matrix build of N child jobs, and M nodes. Each node can only execute one child job at the same time, while child jobs on different nodes don't interfere with each other. Child jobs from different builds don't interfere with each other as long as they don't run on the same node. Is there any example that shows how this can be set up? Right now I observe multiple child jobs being scheduled on the same node. My current configuration (in groovy DSL) is like this (I deleted a bunch of unrelated stuff to make it clearer). Thanks.     def numShards = 5 matrixJob( 'XXXX' ) {   description( 'XXXX' ) axes {     text( 'SHARD' , (0..(numShards - 1)).collect { it.toString() })    label( 'slaves' , "some-label" )  }  concurrentBuild()  throttleConcurrentBuilds { maxPerNode(1)  }   steps {    shell( 'some command' )   } }  

            oleg_nenashev Oleg Nenashev
            cvpcs Austen Dicken
            Votes:
            7 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: