Refactor CI `config` so that it's decouple from Project
After gitlab-ee!4262 (merged)
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 (gitlab-ee!4841 (merged)), specs that involved analyzing the
.gitlab-ci.ymlat some point, failed. To solve this we simply changed
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: gitlab-ee!4887 (diffs)
It'd nice to decouple
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: #43941 (closed)