Hi Basanta ,
you can try custom implementation for parallal stage something like below.

def parallelConverge(instanceNames, targets, runPhase, customParam) {
    def parallelNodes = [:]
    for (instance in instanceNames) {
        def moduleName = instance
        else {
            parallelNodes[moduleName] = this.getNodeForInstance(moduleName, 
targets)
        }
    }
    parallel parallelNodes
}

and 

Closure getNodeForInstance(instanceName, target) {
    return {
        try {
            stageName = "Build_" + instanceName
            stage(stageName) {
                
                        {
                            else {
                                sh "ant -DBUILD_MODULES='${instanceName}' 
-Dpatch.number='' -buildfile ${BUILD_ROOT}/build/build.xml " + target
                            }
                        }
            }
        
        catch (e) {
            println 'exception occured at module' + instanceName + 
"exception occured is" + e
        }
    }
}

Parameterise method as per your requirements .

Hope it willl solve your problem 


On Monday, April 8, 2019 at 4:12:52 PM UTC+5:30, pbasan...@gmail.com wrote:
>
> Hi All,
>
>
> I have a requirement to run a set of tasks for a build in parallel, The 
> tasks for the build are dynamic it may change. I need some help in the 
> implementation of that below are the details of it.
> For Component 1 : 2 jobs need to trigger in parallel 
> for Component 2 : 4 jobs need to trigger in parallel 
> For Component 3 : 3 jobs need to trigger in parallel 
>
> Regards,
> Basanta
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/657d2ba8-73b9-4801-8c8a-9d5be3085a88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to