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

config.rb « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b48d3592f1699c6473700703b299b3ccd3e6968c (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
26
module Gitlab
  module Ci
    ##
    # Base GitLab CI Configuration facade
    #
    class Config
      delegate :valid?, :errors, to: :@global

      ##
      # Temporary delegations that should be removed after refactoring
      #
      delegate :before_script, to: :@global

      def initialize(config)
        @config = Loader.new(config).load!

        @global = Node::Global.new(@config)
        @global.process!
      end

      def to_hash
        @config
      end
    end
  end
end