Answer the question
In order to leave comments, you need to log in
Gitlab CI start only by tag, but different pipe for each branch, how?
Hi all.
Task:
launching a pipeline when a tag is created. In this case, it is necessary to separate Branches
i.e. create Tag 1.0.0 from dev - one process
and if Tag 1.0.0 from master - another
Attempt:
To respond to the tag added to .gitlab-ci.yml to each stage
only:
- /^(\d+\.)?(\d+\.)?(\*|\d+)$/
Answer the question
In order to leave comments, you need to log in
1. in the pipeline itself, using variables or direct access to git, you can determine which branch and perform a specific action. The only problem is that it's not very visual. And such a script can be hard to write
off the bat 2. Use extended gitlab syntax:
https://docs.gitlab.com/ee/ci/yaml/#rules or https://docs.gitlab.com/ee/ci/yaml /#onlyexcept-advanced
For such a task, you need to translate the conditions specified with only and except using double negatives.
https://gitlab.com/gitlab-org/gitlab-foss/issues/2...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question