We just started using GitLab and have some problems with the behaviour.
Standing on branch: feature/test, I would expect ALL of the jobs below to be triggered, but only All Branches except master/dev is triggered.
Anyone know what I'm doing wrong?
Reading the documentation here: https://docs.gitlab.com/13.8/ee/ci/yaml/#rules
stages:
- pre-build
- build
- post-build
- test
- publish
- deploy
All Branches except master/dev:
stage: build
image: openjdk:16-slim
script:
- 'cd .tools'
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
when: never
- if: '$GIT_COMMIT_BRANCH =~ /^dev.*/'
when: never
- when: always
Only Branch Regex:
stage: build
image: openjdk:16-slim
script:
- 'cd .tools'
rules:
- if: '$GIT_COMMIT_BRANCH =~ /^feature.*/'
Only Branch Specific:
stage: build
image: openjdk:16-slim
script:
- 'cd .tools'
rules:
- if: '$GIT_COMMIT_BRANCH == "feature/test"'