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:
-rw-r--r--lib/gitlab/ci/config/entry/job.rb2
-rw-r--r--lib/gitlab/config/entry/factory.rb10
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb
index 5a810cc6436..326f2df1ea7 100644
--- a/lib/gitlab/ci/config/entry/job.rb
+++ b/lib/gitlab/ci/config/entry/job.rb
@@ -150,7 +150,7 @@ module Gitlab
stage: stage_value,
cache: cache_value,
only: only_value,
- except: except_value.to_h,
+ except: except_value,
variables: variables_defined? ? variables_value : nil,
environment: environment_defined? ? environment_value : nil,
environment_name: environment_defined? ? environment_value[:name] : nil,
diff --git a/lib/gitlab/config/entry/factory.rb b/lib/gitlab/config/entry/factory.rb
index 39edfa332b4..089a20dd324 100644
--- a/lib/gitlab/config/entry/factory.rb
+++ b/lib/gitlab/config/entry/factory.rb
@@ -53,10 +53,12 @@ module Gitlab
# If entry has a default value we fabricate concrete node
# with default value.
#
- if @entry.default(@attributes).nil?
- fabricate(Entry::Undefined)
- else
- fabricate(@entry, @entry.default(@attributes))
+ @entry.default(@attributes).yield_self do |default|
+ if default.nil?
+ fabricate(Entry::Undefined)
+ else
+ fabricate(@entry, default)
+ end
end
end