Skip to content

Refactor CI Variables entry

Furkan Ayhan requested to merge refactoring-ci-variables-entry into master

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 in Entry::Variables
  • We currently have SimpleVariable and ComplexVariable
  • 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.

Edited by Furkan Ayhan

Merge request reports