故障/通过脚本返回code不稳定 [英] Failure / Unstable via Script Return Code

查看:495
本文介绍了故障/通过脚本返回code不稳定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得我的詹金斯的结果建立工作要么失败(红色),不稳定(黄色)或全成(绿色)...

I would like to get the result of my jenkins build job either failed (red), unstable (yellow) or successfull (green)...

如果我从我的shell脚本返回非零我只能得到失败。是否有任何回报code产生不稳定的?

If i return non zero from my shell script i can only get failed. Is there any return code which produces unstable ?

推荐答案

没有。脚本退出code不会产生不稳定在詹金斯创建结果。

No. A script exit code will not produce UNSTABLE build result in Jenkins.

只有这样,才能通过詹金斯设置不稳定创建结果被编程。

The only way to set UNSTABLE build result is programmatically through Jenkins.

这是在 测试工具詹金斯部分做了什么。

This is what the test harness portion of Jenkins does.

您也可以使用 詹金斯CLI 直接在脚本来设置当前正在执行的构建的结果。而不是返回特定的出code,都有你的脚本执行詹金斯CLI命令。有关详细信息,在自己的服务器上,转到的http://<您的服务器> / CLI /命​​令/设置集结结果

也有一些插件,可以做同样的,其中包括:

There are also a number of plugins that can do that same, including:

这篇关于故障/通过脚本返回code不稳定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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