Skip to content
Snippets Groups Projects
Commit 6c704fd9 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Inject dependencies into each CI config entry node

parent 7bbb523b
No related branches found
No related tags found
1 merge request!6009Pass dependencies to CI configuration nodes
Loading
Loading
@@ -25,7 +25,7 @@ module Gitlab
 
private
 
def compose!
def compose!(_deps)
self.class.nodes.each do |key, factory|
factory
.value(@config[key])
Loading
Loading
Loading
Loading
@@ -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?
Loading
Loading
@@ -76,7 +79,7 @@ module Gitlab
 
private
 
def compose!
def compose!(_deps)
end
end
end
Loading
Loading
Loading
Loading
@@ -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!
Loading
Loading
Loading
Loading
@@ -107,7 +107,7 @@ module Gitlab
after_script: after_script }
end
 
def compose!
def compose!(_deps)
super
 
if type_defined? && !stage_defined?
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ module Gitlab
 
private
 
def compose!
def compose!(_deps)
@config.each do |name, config|
node = hidden?(name) ? Node::HiddenJob : Node::Job
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment