gitlab-ci-training
gitlab-ci-training copied to clipboard
Add skip jobs using variables example (rules)
stages:
- build
- test
- deploy
build:
stage: build
script: echo Build
except:
variables:
- $SKIP_STAGE_build == "1" && $SKIP_BRANCH == $CI_COMMIT_REF_NAME
test:
stage: test
script: echo Test
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