diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-01 12:52:28 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-01 12:54:58 +0200 |
commit | 41f41911bcab3679f0a0d7ac5a61ac0fb19ca5f3 (patch) | |
tree | 47fbd6c4cf1d90117d72c57b52793feb52c6ef26 /app/models | |
parent | ba81c91255aac2d724ceb94e3eb91f912227e2eb (diff) | |
download | gitlab-ce-refactor_config_processor_save.tar.gz |
Remove save_yaml_error from config_processor and don't create Ci::Commit if no builds were createdrefactor_config_processor_save
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/commit.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index 6675a3f5d53..86b819f2192 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -131,10 +131,10 @@ module Ci @config_processor ||= begin Ci::GitlabCiYamlProcessor.new(ci_yaml_file, project.path_with_namespace) rescue Ci::GitlabCiYamlProcessor::ValidationError, Psych::SyntaxError => e - save_yaml_error(e.message) + self.yaml_errors = e.message nil rescue - save_yaml_error("Undefined error") + self.yaml_errors = "Undefined error" nil end end @@ -169,11 +169,5 @@ module Ci self.duration = statuses.latest.duration save end - - def save_yaml_error(error) - return if self.yaml_errors? - self.yaml_errors = error - update_state - end end end |