I'm using GitLab for code evolution management. All quiet about it. Use merge-requests to review code changes. I also generally use GitFlow , but using the name rc-*
for branches of (GitFlow predicts release-*
).
Briefly on GitFlow, it has nomenclature for branhces, one house has a goal:
-
master
is the branch with the production code, so relatively stable code -
develop
is the branch with the development code, so relatively unstable code -
rc-*
is the branch with the release candidate, is derived fromdevelop
and (when mature enough) will be integrated intomaster
ex:
rc-1.2
is the launch candidate for the1.2
In GitLab, I can set up a build using GitLab CI . This setting is done in the .gitlab-ci.yml
file. In this configuration file, I can determine jobs that run conditionally (#
For example, I might want GitLab to only run the job deploy-lib
on branches master
and develop
:
build:
stage: build
script:
- mvn compile
deploy-lib:
stage: deploy
script:
- mvn deploy
only:
- master
- develop
I'd like to add a job to run only on branches that follow the pattern rc-*
. I did not find anything in the documentation regarding pattern name for jobs:only
, but this is used in several corners in the GitLab web.
So, I ask:
- Can I configure for GitLab-CI to only execute certain job for branches that satisfy the pattern
rc-*
? If so, how do I do this?