Inline initialize_yaml_processor

This commit is contained in:
Matija Čupić 2018-09-12 18:44:35 +02:00
parent 7600a6469b
commit e358ae16b4
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
1 changed files with 1 additions and 5 deletions

View File

@ -464,7 +464,7 @@ module Ci
return @config_processor if defined?(@config_processor)
@config_processor ||= begin
initialize_yaml_processor
::Gitlab::Ci::YamlProcessor.new(ci_yaml_file, { project: project, sha: sha })
rescue Gitlab::Ci::YamlProcessor::ValidationError => e
self.yaml_errors = e.message
nil
@ -474,10 +474,6 @@ module Ci
end
end
def initialize_yaml_processor
::Gitlab::Ci::YamlProcessor.new(ci_yaml_file, { project: project, sha: sha })
end
def ci_yaml_file_path
if project.ci_config_path.blank?
'.gitlab-ci.yml'