diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2022-05-04 09:59:00 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2022-05-04 09:59:00 +0300 |
commit | f3b74dbe76d6d5a83d68dd11d821d0990b5f9035 (patch) | |
tree | 6c49c164de270385881c5bcf7d726236e2535510 | |
parent | 5bf379fa406fa8b49dbc72449ce76e05d71ba1e0 (diff) |
Set default branch for products that don't have a stable branchaxil-default-branch-stable-branch
-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. |