我正在尝试建立具有多个“并行{}”阶段的声明性管道,但无法找到一种解决方案来避免在一个步骤失败时避免所有管道失败。见下文...
如果在stage(“ start group 1”)的任何并行{}阶段出现任何故障,我想继续进行stage(“ start group 2”)
可以做到这一点。
pipeline {
agent { label 'server1' }
stages {
stage('start group 1') {
parallel {
stage('1-1-process') {
steps {
bat "process11.bat"
}
}
stage('1-2-process') {
steps {
bat "process12.bat"
}
}
}
} // end group 1
stage('start group 2') {
parallel {
stage('2-1-process') {
steps {
bat "process21.bat"
}
}
stage('2-2-process') {
steps {
bat "process22.bat"
}
}
}
} // end group 2
}
}