詹金斯(Jenkins)在失败的舞台上继续努力 [英] Jenkins continue pipeline on failed stage

查看:94
本文介绍了詹金斯(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' }
)

这篇关于詹金斯(Jenkins)在失败的舞台上继续努力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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