I\'ve Groovy script as part of the Pipeline job in Jenkins as below:
node {
stage(\'Testing\') {
build job: \'Test\', parameters: [string(name: \
You should use pipeline parallel expression, which will wait for all spawned jobs / subtasks to complete:
stage('testing') {
def branches = [:]
for(i = 0; i < params.size(); i += 1) {
def param = params[i]
branches["Test${i}"] = {
build job: 'Test', parameters: [string(name: 'Name', value: param)], quietPeriod: 2
}
}
parallel branches
}
You can find some more examples in pipeline docs at jenkins.io