diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-20 11:59:49 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-20 15:02:09 +0300 |
commit | f83bccfe4f98281ed80c95189c5f7ed77799b2b3 (patch) | |
tree | 642d4e2abffb566b08b68c5bfe05ee09b6a83296 /lib/ci | |
parent | 795c9f2241db7967d03f7792431fe65013a5dd0f (diff) |
Add minor readability, style improvements in CI config
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index 013813ef00b..24601fdfe85 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -8,7 +8,8 @@ module Ci def initialize(config, path = nil) @ci_config = Gitlab::Ci::Config.new(config) - @config, @path = @ci_config.to_hash, path + @config = @ci_config.to_hash + @path = path unless @ci_config.valid? raise ValidationError, @ci_config.errors.first @@ -120,8 +121,6 @@ module Ci end def validate_job!(name, job) - raise ValidationError, "Unknown parameter: #{name}" unless job.is_a?(Hash) && job.has_key?(:script) - validate_job_stage!(name, job) if job[:stage] validate_job_dependencies!(name, job) if job[:dependencies] end |