Commit 6f02da2c authored by Grzegorz Bizon's avatar Grzegorz Bizon

Simplify legacy CI config processor a little

parent 4491bf28
...@@ -26,7 +26,6 @@ module Ci ...@@ -26,7 +26,6 @@ module Ci
end end
initial_parsing initial_parsing
validate!
rescue Gitlab::Ci::Config::Loader::FormatError => e rescue Gitlab::Ci::Config::Loader::FormatError => e
raise ValidationError, e.message raise ValidationError, e.message
end end
...@@ -71,6 +70,10 @@ module Ci ...@@ -71,6 +70,10 @@ module Ci
@ci_config.jobs.each do |name, param| @ci_config.jobs.each do |name, param|
add_job(name, param) add_job(name, param)
end end
@jobs.each do |name, job|
validate_job!(name, job)
end
end end
def add_job(name, job) def add_job(name, job)
...@@ -108,14 +111,6 @@ module Ci ...@@ -108,14 +111,6 @@ module Ci
} }
end end
def validate!
@jobs.each do |name, job|
validate_job!(name, job)
end
true
end
def validate_job!(name, job) def validate_job!(name, job)
validate_job_name!(name) validate_job_name!(name)
validate_job_keys!(name, job) validate_job_keys!(name, 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