Commit c68de31b authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Make it possible to override config jobs composition in EE

parent 73b66977de5f
...@@ -28,7 +28,11 @@ ...@@ -28,7 +28,11 @@
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|
...@@ -31,8 +35,8 @@ ...@@ -31,8 +35,8 @@
# 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 || {})
......
Supports Markdown
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