for (i = 0; i < sources.length; i++){
String source = sources[i]
String contrib_url = source.split(" ")[0]
String contrib_tag = source.split(" ")[1]
String contrib_dest_path = i.toString().padLeft(4,'0') + "__" + contrib_url.split('/').last() + "__" + contrib_tag
builders[contrib_dest_path] = {
echo "\u2600 Pulling [${contrib_url}] using tag [${contrib_tag}] to [${contrib_dest_path}]"
checkout([$class: 'GitSCM', branches: [[name: "refs/tags/"+contrib_tag]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: contrib_dest_path]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: credentials, url: contrib_url]]])
}
parallel builders
}
Created
October 11, 2017 07:31
-
-
Save ftorto/540551efce6984ebfd5ec7fd762fbb93 to your computer and use it in GitHub Desktop.
Parallelize tasks #jenkins #pipeline
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment