Skip to content

Move interpolation into Ci::Yaml::Loader

Context

Historically, CI config files have been loaded using Gitlab::Ci::Config::Yaml.load!. However, we recently introduced CI headers and CI inputs, which are loaded by combining Gitlab::Ci::Config::Yaml.load_result! with External::Interpolator. The logic that manages the returns from load_result! and Interpolator lives in External::File::Base, so it can only be used to interpolate configurations loaded through the include keyword.

The refactor being tracked in #409846 (closed) aims to complete 2 objectives:

  1. Make it possible to parse CI headers and interpolate inputs in every location where we load CI configuration files
  2. Make it easy to load CI configurations by creating a single source of truth that handles both loading YAML and interpolating the loaded YAML

What does this MR do and why?

This MR is the second MR for #409846 (closed), which aims to create a single source for loading CI configuration YAML files. It moves the logic for interpolating a loaded CI config YAML file into Yaml::Loader, allowing us to use inputs everywhere we load CI YAML files

This was the first MR: !121409 (merged)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #409846 (closed)

Edited by Avielle Wolfe

Merge request reports