Skip to content

Fix CI_ENVIRONMENT_TIER and CI_ENVIRONMENT_URL variables for seed

Furkan Ayhan requested to merge 350057-fix-CI_ENVIRONMENT--variables into master

What does this MR do and why?

When fetching CI_ENVIRONMENT_TIER and CI_ENVIRONMENT_URL, we look for a persistent environment in the project with the provided environment name. We missed this when implementing scoped_variables_for_pipeline_seed.

This MR copies the logic from the model into the variable builder.

I had to move the persisted_environment logic from the Ci::Deployable concern to the Project model to use it independently from a Ci::Build object in the variables builder.

Related to #350057 (closed)

User report: https://gitlab.slack.com/archives/CPCJ8CCCX/p1724983774168299

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading