diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-05-30 14:16:07 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-05-30 14:16:21 +0200 |
commit | 325b2d9329ae90748dd0db749f9ebc0800eaea75 (patch) | |
tree | be5bdfe6230dc100f10a0a93580af2d6a8fbda92 /app/services | |
parent | 6113ff992c9a494ea8c657f20fa92f7f7f2365c4 (diff) | |
download | gitlab-ce-325b2d9329ae90748dd0db749f9ebc0800eaea75.tar.gz |
Remove legacy method from create build service
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/create_pipeline_stages_service.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/services/ci/create_pipeline_stages_service.rb b/app/services/ci/create_pipeline_stages_service.rb index 5c78cca29df..95b55c37ec1 100644 --- a/app/services/ci/create_pipeline_stages_service.rb +++ b/app/services/ci/create_pipeline_stages_service.rb @@ -23,6 +23,7 @@ module Ci user: current_user, trigger_request: trigger_request ) + build = pipeline.builds.create(build_attributes) # Create the environment before the build starts. This sets its slug and @@ -34,17 +35,10 @@ module Ci end def new_builds - @new_builds ||= pipeline.config_builds_attributes. - reject { |build| existing_build_names.include?(build[:name]) } - end - - def existing_build_names - @existing_build_names ||= pipeline.builds.pluck(:name) + @new_builds ||= pipeline.config_builds_attributes end def trigger_request - return @trigger_request if defined?(@trigger_request) - @trigger_request ||= pipeline.trigger_requests.first end end |