How to mark a build unstable in Jenkins when running shell scripts

后端 未结 14 2173
情歌与酒
情歌与酒 2020-11-27 11:31

In a project I\'m working on, we are using shell scripts to execute different tasks. Some are sh/bash scripts that run rsync, and some are PHP scripts. One of the PHP script

14条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-27 12:01

    Modern Jenkins versions (since 2.26, October 2016) solved this: it's just an advanced option for the Execute shell build step!

    You can just choose and set an arbitrary exit value; if it matches, the build will be unstable. Just pick a value which is unlikely to be launched by a real process in your build.

提交回复
热议问题