Skip to content

Run release environment for tag commits

Dat Tang requested to merge run-release-environment-for-tag-commits into master

What does this MR do and why?

Currently, Release Environment pipeline is triggered for every merge to stable branches. However, when it is a commit with tag, it doesn't run, because in that case, CI_COMMIT_REF_NAME is the tag name, not the branch name, so it doesn't match the rule:

    - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab" && $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable-ee$/'

This MR introduces an additional rule, to match the case when a tag is available. Note that currently we have two version tag formats:

  • v17.0.0-rc42-ee
  • v16.11.2-ee

The rule was checked by https://regex101.com/.

    - if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_PATH == "gitlab-org/gitlab" && $CI_COMMIT_TAG =~ /^v?[\d]+\.[\d]+\.[\d]+[\d\w-]*-ee$/'
      when: always

Ref: gitlab-com/gl-infra/delivery#20221 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports