Skip to content

Variable expansion in deployment_tier

What does this MR do and why?

Related #365402.

Support variable expansion in the environment:deployment_tier field of a job in the .gitlab-ci.yml.

⚠️ In order to preserve validation integrity, this blocked until GitLab has upgraded to Rails 7.1, see #365402 (comment 2200490852) for details. (Ref: Blocked by the apic Rails 7.1 upgrade (&11470))

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Run GDK and prepare project.
  2. Define a pipeline. For example,
deploy:
  variables:
    ENV_TIER: production
  environment:
    name: env3
    deployment_tier: $ENV_TIER
  script:
    - echo 'deploy'
    - echo $CI_ENVIRONMENT_TIER
    - echo $ENV_TIER
  1. Run the pipeline. And confirm that the deployment tier is correctly expanded, and the environment tier is updated.
Edited by Taka Nishida

Merge request reports

Loading