Failure / Unstable via Script Return Code

后端 未结 6 1949
别那么骄傲
别那么骄傲 2020-12-11 04:04

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

If i return non zero from my shell script i c

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-11 04:39

    Any Build Step Plugin
    Fail The Build Plugin
    
    first build step: Execute command
      Command: echo build_step
    second build step: conditional step
      Run: Not
        !:Execute command
          Command: echo test_step
      Builder: Set the build result
        Result: Unstable
    
    change "echo test_step" to "echo_test_step" to see how it works
    
    if BUILD fails the result is FAILED, and TEST is not runned
    if BUILD succedes, TEST runs, and if fails the result is UNSTABLE
    if BUILD succedes, and TEST succedes, the result is SUCCESS
    

提交回复
热议问题