基于此this blogpost,您可以在声明性管道中执行此操作。我想知道是否可以用脚本编写。我们已经有一个阶段可以并行运行,但是在脚本化管道中可以运行多个阶段。
答案 0 :(得分:0)
尝试一下:
stage("single step before") {
echo "this is a single step before"
}
stage("parallel tasks") {
parallel 'pipe1': {
stage("parallel 1"){
echo "pipe1: this is parallel 1"
}
stage("parallel 2"){
echo "pipe1: this is parallel 2"
}
stage("parallel 3"){
echo "pipe1: this is parallel 3"
}
}, 'parallel 4': {
echo "pipe2: this is parallel 4"
}
}
stage("single step after") {
echo "this is a single step after"
}