Search code examples
jenkins-pluginsjenkins-pipelinejenkins-clijenkins-job-dsl

start jenkins builds parallely?


I have 'n' no. of jobs, which I want to start simultaneously. Is it feasible in Jenkins? I tried using DSL plugin, work flow plugin. I have used 'parallel' method. I have my list of jobnames in an array/list and want to run them parallel. Please help.

Currently I'm iterating the jobnames in an array, so they start one by one, instead I want them to start parallel. How this can be achieved ?


Solution

  • This will fullfill your requirement

        GParsPool.withPool(NO.OF.THREADS){
            sampleList.eachParallel{
                callYourMethod(it)
            }
        }