3
I’m using Gitlab for code evolution management. It’s all quiet about it. Usage merge-requests to review code changes. I also generally use the Gitflow, only using the name rc-* for launch branches (Gitflow provides release-*).
Briefly about Gitflow, it has nomenclature for branhces, house one has a goal:
masteris the branch with the production code, therefore relatively stable codedevelopis the branch with the development code, so relatively unstable coderc-*is the branch with the launch candidate (release candidate), is derived from thedevelopand (when mature enough) will be integrated into themasterex:
rc-1.2is the release candidate for the version1.2
In Gitlab, I can set up a build using the Gitlab CI. This configuration is done in the file .gitlab-ci.yml. In this configuration file, I can determine Jobs which are executed conditionally (documentation).
For example, I might want Gitlab to only run job deploy-lib in the 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 one job to only run in branches that follow the Pattern rc-*. I found nothing in the documentation regarding Pattern name to the jobs:only, but this is used in various corners on the Gitlab web.
So I ask:
- I can configure for Gitlab-CI to only run certain job for branches that Pattern
rc-*? If yes, how do I do it?