詹金斯在失败阶段继续管道 [英] Jenkins continue pipeline on failed stage

查看:20
本文介绍了詹金斯在失败阶段继续管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有一堆管道的 jenkins 设置.我写了一个新的管道,它可以一次启动所有管道.我想建立其他阶段,即使其中一个失败了.

I have a jenkins setup with a bunch of pipelines. I wrote a new pipeline which can start all pipelines at once. I would like to build other stages, even if one of them fails.

脚本目前看起来是这样的

The script currently looks like this

stage 'CentOS6'
build 'centos6.testing'

stage 'CentOS7'
build 'centos7.testing'

stage 'Debian7'
build 'debian7-x64.testing'

stage 'Debian8'
build 'debian8-x64.testing'

构建脚本本身包含它们应该运行的节点.

The build scripts itself contain the node they should run on.

即使其中一个阶段失败,脚本如何继续执行以下阶段.

How can the script continue with the following stages even if one of them fails.

干杯

推荐答案

如果您使用 parallel 步骤,默认情况下这应该可以正常工作,如 failFast选项,如果任何并行分支失败则中止作业,默认为 false.

If you use the parallel step, this should work as you expect by default, as the failFast option, which aborts the job if any of the parallel branches fail, defaults to false.

例如:

parallel(
    centos6: { build 'centos6.testing' },
    centos7: { build 'centos7.testing' },
    debian7: { build 'debian7-x64.testing' },
    debian8: { build 'debian8-x64.testing' }
)

这篇关于詹金斯在失败阶段继续管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆