diff options
author | Marcel Amirault <mamirault@gitlab.com> | 2022-05-11 13:56:13 +0300 |
---|---|---|
committer | Marcel Amirault <mamirault@gitlab.com> | 2022-05-11 13:56:13 +0300 |
commit | 26083bbe399a35d25e5e7d7fc36aff9384121c1c (patch) | |
tree | 477e65f6af8ea3a5afdbcc6670ded331a69ebc60 | |
parent | a5b448629f064b35079be88caf57be531037e4a7 (diff) | |
parent | f3b74dbe76d6d5a83d68dd11d821d0990b5f9035 (diff) |
Merge branch 'axil-default-branch-stable-branch' into 'main'
Set default branch for products that don't have a stable branch
Closes #1167
See merge request gitlab-org/gitlab-docs!2625
-rw-r--r-- | lib/task_helpers.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/task_helpers.rb b/lib/task_helpers.rb index 01f686c5..32a1559f 100644 --- a/lib/task_helpers.rb +++ b/lib/task_helpers.rb @@ -35,8 +35,10 @@ def retrieve_branch(slug) when 'charts' chart = chart_version(ENV["CI_COMMIT_REF_NAME"]).match(VERSION_FORMAT) "#{chart[:major]}-#{chart[:minor]}-stable" - when 'operator' - "master" + # If the upstream product doesn't follow a stable branch scheme, set the + # branch to the default + else + "#{default_branch(products[slug].fetch('repo'))}" end # If we're NOT on a gitlab-docs stable branch, fetch the BRANCH_* environment # variable, and if not assigned, set to the default branch. |