Commit de8b93bb authored by Grzegorz Bizon's avatar Grzegorz Bizon

Improve validation of CI config entry if composite

parent fea77624
......@@ -20,12 +20,8 @@ module Gitlab
end
def process!
return if leaf?
return unless valid?
compose!
process_nodes!
@validator.validate(:processed)
compose! unless leaf?
@validator.validate(:processed) if valid?
end
def leaf?
......@@ -90,12 +86,12 @@ module Gitlab
private
def compose!
return unless valid?
nodes.each do |key, essence|
@nodes[key] = create_node(key, essence)
end
end
def process_nodes!
@nodes.each_value(&:process!)
end
......
......@@ -27,10 +27,6 @@ module Gitlab
@nodes.values.any?(&:relevant?)
end
def leaf?
false
end
private
def create_node(key, value)
......
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