First CI configuration refactoring interation
In order to reduce implementation efforts when adding new CI features, we want to refactor CI configuration code. See https://gitlab.com/gitlab-org/gitlab-ce/issues/15060, https://gitlab.com/gitlab-org/gitlab-ce/issues/14149
This is issue for first refactoring iteration of GitlabCiYamlProcessor
and related parts of codebase.
In the first iteration we would like to:
-
Create a
Gitlab::Pipeline
module or use existingGitlab::Ci
.We can use name
Gitlab::Pipeline
or existingGitlab::Ci
, name to be defined. -
Create
Pipeline::Config
classThis will be initialized using contents of
.gitlab-ci.yml
and will represent pipeline configuration. -
(Moved to another iteration)
Create aPipeline::Request
classThis will encapsulate stage, ref, tag, and trigger requests (we currently pass this to
GitlabCiYamlProcessor
toGitlabCiYamlProcessor#builds_for_stage_and_ref(stage, ref, tag = false, trigger_request = nil)
. -
Create a
Pipeline::Config::Entry::Job
classClass that will represent configuration entry for each job.
-
(Moved to another iteration)
Create aPipeline::Factory
classWill take
Config
andRequest
instance and will be responsible for fabricatingCi::Build
objects.
In next steps we will extract each configuration entry to separate class, and work on validation and CI Lint.
@ayufan what do you think about this first iteration?