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

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

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            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_issue_link 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_issue_link 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 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 Oleg Nenashev added a comment -

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

            oleg_nenashev Oleg Nenashev added a comment - Marking as resolved (1.8.3). There will be several improvements in 1.8.4
            icando 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')
              }
            }
            

             

            icando 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' )   } }  

            People

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

              Dates

                Created:
                Updated:
                Resolved: