LoginSignup
1
0

More than 5 years have passed since last update.

GitLab Jobsをfailedにする方法

Posted at

概要

GitLab Jobsをコマンドとしては正常なんだけど、コマンドの結果を判定してfailedにしたい。

方法

exit 1を返せばいい。
判定した結果でfailedにしたい場合、exit 1を返せばいい。

.gitlab-ci.yml抜粋

Deploy_03:
    stage: deploy
    script:
        - if [ "NG" == "OK" ]; then exit 0; else exit 1; fi

実行結果

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0