gitlab-org--gitlab-foss/lib/gitlab/ci/config.rb
2016-07-15 21:39:26 +02:00

33 lines
633 B
Ruby

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