diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-18 16:32:00 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-19 12:09:34 +0100 |
commit | 2b907f61ff5db3ff68b27a9d3bb164745ab7703b (patch) | |
tree | 9bedcb788576ad7a60a2362f623d1a57e3afe48a /app | |
parent | a42d469ab2ac13ba40544e4cb40659fb6953d548 (diff) | |
download | gitlab-ce-2b907f61ff5db3ff68b27a9d3bb164745ab7703b.tar.gz |
Commits without .gitlab-ci.yml are marked as skipped
- Save detailed error when YAML syntax
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/commit.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index 33b57173928..73c1570c212 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -188,12 +188,15 @@ module Ci end def config_processor + return nil unless ci_yaml_file @config_processor ||= Ci::GitlabCiYamlProcessor.new(ci_yaml_file, gl_project.path_with_namespace) rescue Ci::GitlabCiYamlProcessor::ValidationError => e save_yaml_error(e.message) nil + rescue Psych::SyntaxError => e + save_yaml_error(e.message) + nil rescue Exception => e - logger.error e.message + "\n" + e.backtrace.join("\n") save_yaml_error("Undefined yaml error") nil end |