parallel
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
timestamps { ansiColor('xterm') {
parallel([
'k1 \u00BB v1': {
stage( 'build k1' ) {
node( 'controller' ) {
println "KEY= k1, VALUE=v1"
sleep 3
} // node
}
timestamps { ansiColor('xterm') {
Map worker = [:]
Map<String, String> data = [
"k1": "v1",
"k2": "v2",
"k3": "v3",
]
data.each { k ,v ->
worker[ "${k} \u00BB ${v}" ] = {
stage( "build ${k}" ) {
node( 'controller' ) {
println """
---------------
"KEY=${k} VALUE=${v}"
---------------
"""
sleep 3
} // node : controller
} // stage
} // work
}
parallel worker
println "done !"
}} // ansiColor | timestamps