Commit a89c366f authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix bridge jobs than can be hidden keys too

parent 83e7e238
......@@ -10,10 +10,12 @@ module EE
override :node_type
def node_type(name)
if bridge?(name)
if hidden?(name)
::Gitlab::Ci::Config::Entry::Hidden
elsif bridge?(name)
::EE::Gitlab::Ci::Config::Entry::Bridge
else
super
::Gitlab::Ci::Config::Entry::Job
end
end
......
......@@ -5,6 +5,7 @@ describe Gitlab::Ci::Config::Entry::Jobs do
described_class.new(
{
'.hidden_job'.to_sym => { script: 'something' },
'.hidden_bridge'.to_sym => { trigger: 'my/project' },
regular_job: { script: 'something' },
my_trigger: { trigger: 'my/project' }
}
......@@ -24,6 +25,11 @@ describe Gitlab::Ci::Config::Entry::Jobs do
.to eq ::Gitlab::Ci::Config::Entry::Hidden
end
it 'correctly identifies hidden bridge jobs' do
expect(subject.node_type(:'.hidden_bridge'))
.to eq ::Gitlab::Ci::Config::Entry::Hidden
end
it 'correctly identifies regular jobs' do
expect(subject.node_type(:regular_job))
.to eq ::Gitlab::Ci::Config::Entry::Job
......
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