简体   繁体   English

是否有bash脚本Jenkins的工作报告为Red,Amber和Green?

[英]Is it possible to have a bash script Jenkins job report Red, Amber, and Green?

I have a couple of bash scripts running on Jenkins which return 0 and 1 exit codes depending on their outcome and the Jenkins job shows as green and red, respectively. 我在Jenkins上运行了几个bash脚本,它们根据结果返回01退出代码,并且Jenkins作业分别显示为绿色和红色。

We have other Jenkins jobs which sometimes go amber. 我们还有其他Jenkins工作,有时会变成琥珀色。 What exit code do I need to return to get that from a bash script? 要从bash脚本获取该退出代码,我需要返回什么退出代码?

The "Execute Shell" build step has an Advanced button. “执行外壳”构建步骤具有“高级”按钮。
Click on it and you can enter the exit code that Jenkins will interpret as "unstable". 单击它,您可以输入詹金斯将解释为“不稳定”的退出代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM