debian-mirror-gitlab/lib/gitlab/ci/pipeline/seed/context.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
556 B
Ruby
Raw Normal View History

2021-04-29 21:17:54 +05:30
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
module Seed
class Context
2022-03-02 08:16:31 +05:30
attr_reader :pipeline, :root_variables, :logger
2021-04-29 21:17:54 +05:30
2022-03-02 08:16:31 +05:30
def initialize(pipeline, root_variables: [], logger: nil)
2021-04-29 21:17:54 +05:30
@pipeline = pipeline
@root_variables = root_variables
2022-03-02 08:16:31 +05:30
@logger = logger || build_logger
end
private
def build_logger
::Gitlab::Ci::Pipeline::Logger.new(project: pipeline.project)
2021-04-29 21:17:54 +05:30
end
end
end
end
end
end