Refactor CI `config` so that it's decouple from Project

After https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4262 EE::Ci::Config is now strictly related to a Project. We did this so in case a local file is referenced on the include, we can make sure the file actually exists in the project. This validation is done by fetching the file from the repository through a SHA.

This brought the following problems:

  • When changing external support from Premium to Starter (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4841), specs that involved analyzing the .gitlab-ci.yml at some point, failed. To solve this we simply changed create(:project) to create(:project, :repository), to ensure every project has a commit. The solution is not going to be super obvious to everyone.

  • Random failures on EE master: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4887/diffs

  • CI/lint page is not related to a project, so it does not support include keyword. (This is being solved on https://gitlab.com/gitlab-org/gitlab-ce/issues/43603)

It'd nice to decouple Project from EE::Ci::Config, because it's only use for processing external files, so it doesn't make too much sense to have it there.

Issue related: https://gitlab.com/gitlab-org/gitlab-ce/issues/43941

Assignee Loading
Time tracking Loading