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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r--lib/gitlab/ci/config/external/mapper.rb1
-rw-r--r--lib/gitlab/ci/config/external/mapper/normalizer.rb4
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/external/mapper.rb b/lib/gitlab/ci/config/external/mapper.rb
index cff7954235f..fcd65b2f2d7 100644
--- a/lib/gitlab/ci/config/external/mapper.rb
+++ b/lib/gitlab/ci/config/external/mapper.rb
@@ -11,6 +11,7 @@ module Gitlab
AmbigiousSpecificationError = Class.new(Error)
TooManyIncludesError = Class.new(Error)
TooMuchDataInPipelineTreeError = Class.new(Error)
+ InvalidTypeError = Class.new(Error)
def initialize(values, context)
@locations = Array.wrap(values.fetch(:include, [])).compact
diff --git a/lib/gitlab/ci/config/external/mapper/normalizer.rb b/lib/gitlab/ci/config/external/mapper/normalizer.rb
index 8fc798e78a0..b07726f7c11 100644
--- a/lib/gitlab/ci/config/external/mapper/normalizer.rb
+++ b/lib/gitlab/ci/config/external/mapper/normalizer.rb
@@ -25,8 +25,10 @@ module Gitlab
location = variables_expander.expand(location)
normalize_location_string(location)
- else
+ elsif location.is_a?(Hash)
location.deep_symbolize_keys
+ else
+ raise Mapper::InvalidTypeError, 'Each include must be a hash or a string'
end
end
end