summaryrefslogtreecommitdiff
path: root/app/services/ci
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 16:22:53 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-06-03 16:22:53 +0200
commit393ec8e74a328660b3d7eaafb25708bc1fa13ee3 (patch)
treef37390a918dc717980e7bb649e6859dd4b23632e /app/services/ci
parent20c7144ed20bad499b878425d5fbab408ad066b5 (diff)
downloadgitlab-ce-393ec8e74a328660b3d7eaafb25708bc1fa13ee3.tar.gz
Rename `commit` to `pipeline` in application code
Diffstat (limited to 'app/services/ci')
-rw-r--r--app/services/ci/create_builds_service.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/services/ci/create_builds_service.rb b/app/services/ci/create_builds_service.rb
index 18274ce24e2..41ce6982cbe 100644
--- a/app/services/ci/create_builds_service.rb
+++ b/app/services/ci/create_builds_service.rb
@@ -1,7 +1,7 @@
module Ci
class CreateBuildsService
- def initialize(commit)
- @commit = commit
+ def initialize(pipeline)
+ @pipeline = pipeline
end
def execute(stage, user, status, trigger_request = nil)
@@ -21,8 +21,8 @@ module Ci
builds_attrs.map do |build_attrs|
# don't create the same build twice
- unless @commit.builds.find_by(ref: @commit.ref, tag: @commit.tag,
- trigger_request: trigger_request, name: build_attrs[:name])
+ unless @pipeline.builds.find_by(ref: @pipeline.ref, tag: @pipeline.tag,
+ trigger_request: trigger_request, name: build_attrs[:name])
build_attrs.slice!(:name,
:commands,
:tag_list,
@@ -31,13 +31,13 @@ module Ci
:stage,
:stage_idx)
- build_attrs.merge!(ref: @commit.ref,
- tag: @commit.tag,
+ build_attrs.merge!(ref: @pipeline.ref,
+ tag: @pipeline.tag,
trigger_request: trigger_request,
user: user,
- project: @commit.project)
+ project: @pipeline.project)
- @commit.builds.create!(build_attrs)
+ @pipeline.builds.create!(build_attrs)
end
end
end
@@ -45,7 +45,7 @@ module Ci
private
def config_processor
- @config_processor ||= @commit.config_processor
+ @config_processor ||= @pipeline.config_processor
end
end
end