From fc00c545b27ab2f4bf713ae246c197f809dd4c11 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 21 Jun 2016 12:40:52 +0200 Subject: Handle CI services config in new CI config classes --- lib/ci/gitlab_ci_yaml_processor.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/ci') diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index f4ef449c84c..2cb46448e76 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -14,7 +14,7 @@ module Ci ALLOWED_CACHE_KEYS = [:key, :untracked, :paths] ALLOWED_ARTIFACTS_KEYS = [:name, :untracked, :paths, :when, :expire_in] - attr_reader :after_script, :services, :path, :cache + attr_reader :after_script, :path, :cache def initialize(config, path = nil) @ci_config = Gitlab::Ci::Config.new(config) @@ -68,7 +68,7 @@ module Ci @after_script = @config[:after_script] @image = @config[:image] - @services = @config[:services] + @services = @ci_config.services @stages = @config[:stages] || @config[:types] @variables = @config[:variables] || {} @cache = @config[:cache] @@ -127,10 +127,6 @@ module Ci raise ValidationError, "after_script should be an array of strings" end - unless @services.nil? || validate_array_of_strings(@services) - raise ValidationError, "services should be an array of strings" - end - unless @stages.nil? || validate_array_of_strings(@stages) raise ValidationError, "stages should be an array of strings" end -- cgit v1.2.3