summaryrefslogtreecommitdiff
path: root/app/models/ci
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-09-07 22:03:05 +0200
committerMatija Čupić <matteeyah@gmail.com>2018-09-07 22:03:05 +0200
commit3149b5cfea4d8f14d69bb2520974f588454a0762 (patch)
tree8cb9fac721255e2ecf2c21ac1b18f1af430f252a /app/models/ci
parent1a53f017b4c2106da3425f3dcbe40fb95fd44bbf (diff)
downloadgitlab-ce-3149b5cfea4d8f14d69bb2520974f588454a0762.tar.gz
Improve external architecture
CE mirror of 4f17c7b2c30188302e6a73421acbf5a09fb2c823
Diffstat (limited to 'app/models/ci')
-rw-r--r--app/models/ci/pipeline.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index f3a40204305..27e0ade2722 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -464,7 +464,7 @@ module Ci
return @config_processor if defined?(@config_processor)
@config_processor ||= begin
- Gitlab::Ci::YamlProcessor.new(ci_yaml_file, project)
+ initialize_yaml_processor
rescue Gitlab::Ci::YamlProcessor::ValidationError => e
self.yaml_errors = e.message
nil
@@ -474,6 +474,10 @@ module Ci
end
end
+ def initialize_yaml_processor
+ Gitlab::Ci::YamlProcessor.new(ci_yaml_file, { project: project, branch_name: ref })
+ end
+
def ci_yaml_file_path
if project.ci_config_path.blank?
'.gitlab-ci.yml'