Commit 6c704fd9 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Inject dependencies into each CI config entry node

parent 7bbb523b
......@@ -25,7 +25,7 @@ module Gitlab
private
def compose!
def compose!(_deps)
self.class.nodes.each do |key, factory|
factory
.value(@config[key])
......
......@@ -20,11 +20,14 @@ module Gitlab
@validator.validate(:new)
end
def process!
def process!(deps = nil)
return unless valid?
compose!
descendants.each(&:process!)
compose!(deps)
descendants.each do |entry|
entry.process!(deps)
end
end
def leaf?
......@@ -76,7 +79,7 @@ module Gitlab
private
def compose!
def compose!(_deps)
end
end
end
......
......@@ -36,9 +36,13 @@ module Gitlab
helpers :before_script, :image, :services, :after_script,
:variables, :stages, :types, :cache, :jobs
def process!(_deps = nil)
super(self)
end
private
def compose!
def compose!(_deps)
super
compose_jobs!
......
......@@ -107,7 +107,7 @@ module Gitlab
after_script: after_script }
end
def compose!
def compose!(_deps)
super
if type_defined? && !stage_defined?
......
......@@ -28,7 +28,7 @@ module Gitlab
private
def compose!
def compose!(_deps)
@config.each do |name, config|
node = hidden?(name) ? Node::HiddenJob : Node::Job
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment