Updates variable value in Entry::Variable to be string rather than array and adds options
What does this MR do and why?
Improves based on feedback: #363660 (comment 1189635268). Additionally significantly simplifies variables implementation.
FROM:
variables:
DEPLOY_ENVIRONMENT:
value:
- "staging" # staging should appear by default
- "canary" # Canary is the second option in a dropdown list
- "production" # Production is the third option in a dropdown list
description: "The deployment target. Change this variable to 'canary' or 'production' if needed."
TO:
variables:
DEPLOY_ENVIRONMENT:
value: staging
options:
- "staging"
- "canary"
- "production"
description: "The deployment target. Change this variable to 'canary' or 'production' if needed."
Validation that value
is contained in options
:
Job log (I selected production
):
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 Laura Montemayor