添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
失恋的酱肘子  ·  Quizlet 版 - 下载·  4 周前    · 
还单身的山寨机  ·  USAJOBS - Search·  1 月前    · 
风流的人字拖  ·  Andoird | WebGAL 文档·  3 月前    · 
胆小的青椒  ·  Compiler Warning ...·  4 月前    · 

Note: See https://gitlab.com/gitlab-org/gitlab-ce/issues/37397 and https://gitlab.com/gitlab-org/gitlab-ce/issues/19232 for similar issues that are covering this request.

I understand the existing Skipping Builds functionality, but I'd like to conditionally skip a build based on an arbitrary condition in my build script. For example, maybe you don't want to deploy if the branch is not master, so you do something like:

  script:
      if [ "$CI_BUILD_REF_NAME" != "master" ]; then
        echo "Skipping deploy for non-master branch $CI_BUILD_REF_NAME"
        exit 0

This is fine, but it's not very semantic: the CI view shows all green, when in reality it should indicate that the build step was skipped (yellow?).

Edited by Fabio Busatto