Add expanded attribute to variables settings
What does this MR do and why?
frontend implementation for #217309 (closed).
Expanded variables will treat values with the $
as a variable reference. Unexpanded variables will otherwise treat them as raw strings.
This MR adds the ability to toggle this attribute for project and group CI/CD variables through the settings page.
Screenshots or screen recordings
Expanded Enabled | Expanded Disabled |
---|---|
Adding/Updating a Variable
Screen_Recording_2022-12-02_at_23.51.48
How to set up and validate locally
- For a project or group, go to Settings > CI/CD. Expand the Variables section.
- Verify that the Expanded column is in the variables table.
- Click Add Variable modal.
-
Expand variable reference
checkbox should be available. - If variable is expanded and value has a
$
character, the Variable Reference alert is rendered. - If variable is NOT expanded, value field will show the following tip:
Variable value will be evaluated as raw string.
- User should also be able to set the variable as expanded or non-expanded when editing an existing variable.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Mireya Andres