BigW Consortium Gitlab

Commit f067202e by Grzegorz Bizon

Improve creating CI config entries for jobs config

parent a7ac2f74
...@@ -29,14 +29,18 @@ module Gitlab ...@@ -29,14 +29,18 @@ module Gitlab
private private
def create_node(key, value) def create_node(name, config)
job_node = key.to_s.start_with?('.') ? Node::HiddenJob : Node::Job job_node(name).new(config, job_attributes(name))
end
job_attributes = { key: key, def job_node(name)
parent: self, name.to_s.start_with?('.') ? Node::HiddenJob : Node::Job
description: "#{key} job definition." } end
job_node.new(value, attributes.merge(job_attributes)) def job_attributes(name)
@attributes.merge(key: name,
parent: self,
description: "#{name} job definition.")
end end
end end
end end
......
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