Refactor CI Variables entry
What does this MR do and why?
This MR refactors Gitlab::Ci::Config::Entry::Variables
.
Entry::Variables
is getting complicated when we add another feature to it. For now, each variable accepts either a single alphanumeric value or a hash including value/description
. We plan to add the "expand" attribute to it (#353991 (closed)). Also, we plan to support an array of values (#362934 (closed)).
In this commit, we refactored it to prepare those changes.
- We create
Entry::Variable
and use it inEntry::Variables
- We currently have
SimpleVariable
andComplexVariable
- In order to allow other data attributes (
expand
), we change from "use_value_data" to "allowed_value_data".
These changes are behind a feature flag ci_variables_refactoring_to_variable
#371559 (closed).
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 Furkan Ayhan