My .gitlab-ci.yml looks like below. Since docker-build stage will run if branch is master and deploy-dev depends on docker-build stage. deploy-dev stage is showing up even the branch is not master but a feature branch I dont want deploy-dev stage to show up either. It does not make sense, and can cause problem. How can I achieve this? Thanks
docker-build:
image: docker:19.03.12
stage: docker-build
services:
- docker:19.03.12-dind
script:
- docker build -t .....
rules:
- if: '$CI_COMMIT_REF_NAME == "master"'
deploy-dev:
stage: deploy
image: microsoft/azure-cli
dependencies:
- docker-build
script:
- ......
when:
manual
deploy-dev? Only on master ? - Nicolas Pepinsterdocker-build, that's not possible. - Nicolas Pepinster