summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-29 10:02:02 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-29 10:02:02 +0200
commitb85d4969a973862414560bd23b5ff4192dfaa372 (patch)
tree89db082657737fe14c1b0da07ff71fd7188f42cd /lib
parent7759242ae5da221ebe02e9e4b79be3e6aadc9bc6 (diff)
downloadgitlab-ce-b85d4969a973862414560bd23b5ff4192dfaa372.tar.gz
Return compound value if CI config node is composite
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/config/node/entry.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/node/entry.rb b/lib/gitlab/ci/config/node/entry.rb
index 985d1705191..8fece12232b 100644
--- a/lib/gitlab/ci/config/node/entry.rb
+++ b/lib/gitlab/ci/config/node/entry.rb
@@ -47,7 +47,12 @@ module Gitlab
end
def value
- @config
+ if leaf?
+ @config
+ else
+ defined = @nodes.select { |_key, value| value.defined? }
+ Hash[(defined).map { |key, node| [key, node.value] }]
+ end
end
def defined?