Closed SteRoh closed 2 years ago
I think you can close this issue, my understanding of git + tags was a little bit confusing.
A tag is not related to a branch but we create our packages for each tag commit. Now I´m solving my problem with a tag convention.
rules:
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/'
variables:
CONAN_CHANNEL: "stable"
- if: '$CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^(\d+\.\d+\.\d*-rc.+$)/'
variables:
CONAN_CHANNEL: "testing"
Maybe this helps other people which are a bit slow on the uptake :)
Description of Problem, Request, or Question
I'm trying to use CPT from a Giltab CI pipeline where Conan packages are uploaded to an Artifactory instance. There is one master branch and multiple develop branches. Each tag shall upload my package either to stable (tag on master branch) or testing (tag on other branches).
My assumption was to use the stable_branch_pattern, but this does not belong to
$CI_BUILD_REF_NAME
. If I tag on master branch CPT detects only the tag:Obviously this tag does not match the pattern.
Steps to reproduce (Include if Applicable)
My expected GitLab stage:
My CPT output if i tag on master
Is there an easy way to use the gitlab
only: -tags
feature with stable/testing detection? My current solution always uploads to testing, due to misleading branch detection.Environment Details