gitlab-ci-training
gitlab-ci-training copied to clipboard
add example except/variables
# .gitlab-ci.yml
stages:
- build
- test
- deploy
build:
stage: build
script: echo build && sleep 10
except:
variables:
- $SKIP_STAGE_build == "1" && $SKIP_BRANCH == $CI_COMMIT_REF_NAME
test:
stage: test
script: echo test && sleep 10
except:
variables:
- $SKIP_STAGE_test == "1" && $SKIP_BRANCH == $CI_COMMIT_REF_NAME
deploy:
stage: deploy
script: echo deploy
except:
variables:
- $SKIP_STAGE_deploy == "1" && $SKIP_BRANCH == $CI_COMMIT_REF_NAME