Commit 5692c282 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Make it possible to override config jobs composition in EE

parent 965dbbd2
...@@ -28,11 +28,15 @@ module Gitlab ...@@ -28,11 +28,15 @@ module Gitlab
name.to_s.start_with?('.') name.to_s.start_with?('.')
end end
def node_type(name)
hidden?(name) ? Entry::Hidden : Entry::Job
end
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def compose!(deps = nil) def compose!(deps = nil)
super do super do
@config.each do |name, config| @config.each do |name, config|
node = hidden?(name) ? Entry::Hidden : Entry::Job node = node_type(name)
factory = ::Gitlab::Config::Entry::Factory.new(node) factory = ::Gitlab::Config::Entry::Factory.new(node)
.value(config || {}) .value(config || {})
......
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