gitlab-org--gitlab-foss/lib/gitlab/ci/config.rb
Grzegorz Bizon d399128955 Handle after script CI config in new classes
This also makes Script to return an array of commands instead of
concatented command, which is our current direction.
2016-06-21 13:02:14 +02:00

32 lines
582 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, 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