diff options
author | Jeff Stubler <brunsa2@gmail.com> | 2015-12-03 21:53:06 -0600 |
---|---|---|
committer | Jeff Stubler <brunsa2@gmail.com> | 2015-12-03 21:53:06 -0600 |
commit | 932a7fd96f5977db6119205daa85495ea161dd68 (patch) | |
tree | 251f02d786fcec000bacfb3d19e063a636fc9635 /app/models/ci/commit.rb | |
parent | 64ca9cf3e4a56a19f09160a91c5433d2ddb632cf (diff) | |
parent | e9d06903dab75129a0df63e686e18e85bfaeee8d (diff) | |
download | gitlab-ce-932a7fd96f5977db6119205daa85495ea161dd68.tar.gz |
Merge branch 'master' into diverging-branch-graphs
Diffstat (limited to 'app/models/ci/commit.rb')
-rw-r--r-- | app/models/ci/commit.rb | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index e58420d82d4..971e899de84 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -1,18 +1,19 @@ # == Schema Information # -# Table name: commits +# Table name: ci_commits # -# id :integer not null, primary key -# project_id :integer -# ref :string(255) -# sha :string(255) -# before_sha :string(255) -# push_data :text -# created_at :datetime -# updated_at :datetime -# tag :boolean default(FALSE) -# yaml_errors :text -# committed_at :datetime +# id :integer not null, primary key +# project_id :integer +# ref :string(255) +# sha :string(255) +# before_sha :string(255) +# push_data :text +# created_at :datetime +# updated_at :datetime +# tag :boolean default(FALSE) +# yaml_errors :text +# committed_at :datetime +# gl_project_id :integer # module Ci @@ -187,13 +188,13 @@ 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 + rescue Ci::GitlabCiYamlProcessor::ValidationError, 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") + rescue + save_yaml_error("Undefined error") nil end |