So I want to run following jobs in parallel -
ccsmp_tag_Android()
ccsmp_tag_OpenVms-ia64()
ccsmp_tag_epoll-linux26-x64()
ccsmp_tag_iphoneOS_176()
ccsmp_tag_linux26-i386()
ccsmp_tag_linux26-x64()
ccsmp_tag_multios()
ccsmp_tag_win_platform()
I am trying to write a scripted syntax for this. Please help me with this any suggestions are highly appreciated
CodePudding user response:
Example of a scripted pipeline stage running parallel jobs:
stage('Parallel Jobs') {
parallel(
'Job 1': {
ccsmp_tag_Android()
},
'Job 2': {
ccsmp_tag_epoll-linux26-x64()
},
... (and so on)
)
}
Depending on your jobs definition, you may also have to put a "node" around:
stage('Parallel Jobs') {
parallel(
'Job 1': {
node {
ccsmp_tag_Android()
}
},
'Job 2': {
node {
ccsmp_tag_epoll-linux26-x64()
}
},
... (and so on)
)
}
See: https://www.jenkins.io/doc/book/pipeline/syntax/#scripted-pipeline