Skip to content

Allow the environment name to be influenced by CI variables

DJ Mountney requested to merge allow-env-name-override into master

What does this MR do?

This will allow us to trigger different environments for the same branch when testing upstream changes. (Allowing us to trigger a test pipeline here in the charts, from a CNG repo merge request)

We are using a prefix env variable, rather than just having a variable that defaults to the commit ref, but can be overridden, due to limitations with nested variables in gitlab-ci: gitlab-org/gitlab#293674 (comment 681736616) that actually prevents us from using nested runtime variables in the environment section. (Its our default review branches that end up not working when we try this, they end up as gke_review/$CI_COMMIT_REF_SLUG where the variables is not expanded)

To workaround this, when the CNG repo triggers a build in this repo, it will use the prefix, and set it to its pipeline id.

Related issues

#2824 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for omnibus-gitlab opened
Edited by Jason Plum

Merge request reports