Jus*_*wis 24
从13.8开始这是可能的:
test_job:
script:
- execute_script_that_will_fail
# if the script exit code is 137 or 255 the job will allow to be
# failed and the pipeline will continue to run
allow_failure:
exit_codes: # User defined exit code
- 137
- 255
Run Code Online (Sandbox Code Playgroud)
Mur*_*nik 10
Gitlab 中的警告不是您可以从作业中控制的退出状态,而是作业本身的配置选项。在.gitlab-ci.yml文件中,您需要添加标志allow_failure:
somejob:
stage: test
script:
- some_script
allow_failure: true
Run Code Online (Sandbox Code Playgroud)
如果此作业随后失败(即以不是 的退出代码终止0),它将以警告状态结束,并且不会阻止管道继续。
| 归档时间: |
|
| 查看次数: |
464 次 |
| 最近记录: |