diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-06 14:24:31 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-06 14:24:31 +0200 |
commit | 6f02da2c4e069ef4ab550dc43176dc0563c95017 (patch) | |
tree | a55e10a033f0f8a1f1ba4c056eaa873545129b62 /lib/ci/gitlab_ci_yaml_processor.rb | |
parent | 4491bf28e10da258701b316f397c5802f5f9974e (diff) | |
download | gitlab-ce-6f02da2c4e069ef4ab550dc43176dc0563c95017.tar.gz |
Simplify legacy CI config processor a little
Diffstat (limited to 'lib/ci/gitlab_ci_yaml_processor.rb')
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 13 |
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) |