diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-25 12:29:01 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-25 12:29:01 +0300 |
commit | 5692c282afe15ca0c8e99568984e48b4b7b4109a (patch) | |
tree | ad26227efd37aebc6c4e2ced51f08aa0fd6dcd94 /lib | |
parent | 965dbbd24c3554452842e46f21aaf0dabee636bd (diff) |
Make it possible to override config jobs composition in EE
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/config/entry/jobs.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/entry/jobs.rb b/lib/gitlab/ci/config/entry/jobs.rb index 82b72e40404..9845c4af655 100644 --- a/lib/gitlab/ci/config/entry/jobs.rb +++ b/lib/gitlab/ci/config/entry/jobs.rb @@ -28,11 +28,15 @@ module Gitlab name.to_s.start_with?('.') end + def node_type(name) + hidden?(name) ? Entry::Hidden : Entry::Job + end + # rubocop: disable CodeReuse/ActiveRecord def compose!(deps = nil) super do @config.each do |name, config| - node = hidden?(name) ? Entry::Hidden : Entry::Job + node = node_type(name) factory = ::Gitlab::Config::Entry::Factory.new(node) .value(config || {}) |