Skip to content

Introduce nested expansion for resource group name

What does this MR do and why?

Introduce nested expansion for resource group name

Following the suggested code update in the linked issue, change where the Resource Group names are generated to expand all nested variables found within the string.

Introduce a feature flag for the capability and add testing with both states of the flag.

GitLab Issue: Nested variables in build:resource_group are no... (#361438 - 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.

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

  • Create a CI YAML file with two variables and a build with a resource group.
    • The first variable should contain text: var: "blah"
    • The second variable should reference the contents of the first: foo: ${var}_text
    • The resource group should reference the contents of the second: resource_group: ${foo}_group
  • Kick off the pipeline, see that only one layer is expanded
    • The job should refer to the resource group as ${var}_text_group
  • Enable the feature flag
  • Restart the pipeline and see that all nested references are expanded
    • The job should refer to the resource group as blah_text_group
Edited by Joe Snyder

Merge request reports