debian-mirror-gitlab/lib/gitlab/ci/config.rb

34 lines
626 B
Ruby
Raw Normal View History

module Gitlab
module Ci
##
# Base GitLab CI Configuration facade
#
class Config
##
# Temporary delegations that should be removed after refactoring
#
2016-08-24 12:49:21 +05:30
delegate :before_script, :image, :services, :after_script, :variables,
:stages, :cache, to: :@global
def initialize(config)
@config = Loader.new(config).load!
@global = Node::Global.new(@config)
@global.process!
end
2016-08-24 12:49:21 +05:30
def valid?
@global.valid?
end
def errors
@global.errors
end
def to_hash
@config
end
end
end
end