Welcome to mirror list, hosted at ThFree Co, Russian Federation.

context.rb « seed « pipeline « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c0b8ebeb83379c25c0eb7b9c265cdff8a1de1ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

module Gitlab
  module Ci
    module Pipeline
      module Seed
        class Context
          attr_reader :pipeline, :root_variables, :logger

          def initialize(pipeline, root_variables: [], logger: nil)
            @pipeline = pipeline
            @root_variables = root_variables
            @logger = logger || build_logger
          end

          private

          def build_logger
            ::Gitlab::Ci::Pipeline::Logger.new(project: pipeline.project)
          end
        end
      end
    end
  end
end