这是我正在玩的代码
node {
stage 'build'
echo 'build'
stage 'tests'
echo 'tests'
stage 'end-to-end-tests'
def e2e = build job:'end-to-end-tests', propagate: false
result = e2e.result
if (result.equals("SUCCESS")) {
stage 'deploy'
build 'deploy'
} else {
?????? I want to just fail this stage
}
}
Run Code Online (Sandbox Code Playgroud)
有没有办法让我将"端到端测试"阶段标记为失败,而不会使整个工作失败?传播假只是总是将舞台标记为真,这不是我想要的,但传播真实标志着失败的工作,我也不想要.