In my main script, I am dynamically defining a playCompBuilderList. Then I iterate through through the list and trigger the build for each item, as shown below.. My question is, how do I wrap it up in parallel statement to trigger the builds in parallel?
playCompBuilderList.each {
it.each {
comp, map -> build('play_comp_builder',
COMP : map['comp'],
COMP_TAG : map['comp_tag'],
CORUS_TAG : map['corus_tag'],
DRAGONBALL_TAG : map['dragonball_tag'],
PLAY_VERSION : map['play_version'])
}
}
This is a sample playCompBuilderList ==> [
{
"athena": {
"comp": "athena",
"comp_tag": "develop",
"corus_tag": "develop",
"dragonball_tag": "master",
"play_version": "2.3.6"
}
},
{
"atlas": {
"comp": "atlas",
"comp_tag": "develop",
"corus_tag": "develop",
"dragonball_tag": "master",
"play_version": "2.3.6"
}
}
]
I tried something like this but didn’t work:
parallel (
playCompBuilderList.each {
it.each {
comp, map -> build('play_comp_builder',
COMP : map['comp'],
COMP_TAG : map['comp_tag'],
CORUS_TAG : map['corus_tag'],
DRAGONBALL_TAG : map['dragonball_tag'],
PLAY_VERSION : map['play_version'])
}
}
)
Please help! Thanks.