添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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