summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-11-18 16:32:00 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-11-19 12:09:34 +0100
commit2b907f61ff5db3ff68b27a9d3bb164745ab7703b (patch)
tree9bedcb788576ad7a60a2362f623d1a57e3afe48a /app
parenta42d469ab2ac13ba40544e4cb40659fb6953d548 (diff)
downloadgitlab-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.rb5
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