stage('test'){
node {
checkouts = [:]
for (i=0; i<10; i++) {
def x = i
checkouts["foo${x}"] = {
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false, extensions:
[[$class: 'RelativeTargetDirectory', relativeTargetDir: "foo${x}"],
[$class: 'ScmName', name: "foo${x}"]],
submoduleCfg: [], userRemoteConfigs: [[url: "/tmp/foo${x}"]]])
}
}
parallel checkouts
}
}