我有以下工作流程:
def flow
node('envinf1')
{
def buildTasks = [:]
for(i = 0; i < 2; i++) {
buildTasks[i] = {
sh 'some command which fails in one of the tasks'
}
}
parallel buildTasks
echo 'Some message!'
}
当其中一项任务失败时,工作流永远不会到达echo ...
-line,而是整个作业失败并出现异常:
org.jenkinsci.plugins.workflow.cps.steps.ParallelStepException: Parallel step 0 failed
at org.jenkinsci.plugins.workflow.cps.steps.ParallelStep$ResultHandler$Callback.checkAllDone(ParallelStep.java:153)
...
是否可以告诉parallel
-step 继续使用工作流脚本?