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

后端 未结 14 2177
情歌与酒
情歌与酒 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:16

    you should also be able to use groovy and do what textfinder did

    marking a build as un-stable with groovy post-build plugin

    if(manager.logContains("Could not login to FTP server")) {
        manager.addWarningBadge("FTP Login Failure")
        manager.createSummary("warning.gif").appendText("

    Failed to login to remote FTP Server!

    ", false, false, false, "red") manager.buildUnstable() }

    Also see Groovy Postbuild Plugin

提交回复
热议问题