summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-06 14:24:31 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-06 14:24:31 +0200
commit6f02da2c4e069ef4ab550dc43176dc0563c95017 (patch)
treea55e10a033f0f8a1f1ba4c056eaa873545129b62 /lib/ci
parent4491bf28e10da258701b316f397c5802f5f9974e (diff)
downloadgitlab-ce-6f02da2c4e069ef4ab550dc43176dc0563c95017.tar.gz
Simplify legacy CI config processor a little
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/gitlab_ci_yaml_processor.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb
index ab77d4df841..f0710690985 100644
--- a/lib/ci/gitlab_ci_yaml_processor.rb
+++ b/lib/ci/gitlab_ci_yaml_processor.rb
@@ -26,7 +26,6 @@ module Ci
end
initial_parsing
- validate!
rescue Gitlab::Ci::Config::Loader::FormatError => e
raise ValidationError, e.message
end
@@ -71,6 +70,10 @@ module Ci
@ci_config.jobs.each do |name, param|
add_job(name, param)
end
+
+ @jobs.each do |name, job|
+ validate_job!(name, job)
+ end
end
def add_job(name, job)
@@ -108,14 +111,6 @@ module Ci
}
end
- def validate!
- @jobs.each do |name, job|
- validate_job!(name, job)
- end
-
- true
- end
-
def validate_job!(name, job)
validate_job_name!(name)
validate_job_keys!(name, job)