Commit 096a7c43 authored by Furkan Ayhan's avatar Furkan Ayhan Committed by Fabio Pitino

Change the service namespace

parent 52ce8d7b
# frozen_string_literal: true # frozen_string_literal: true
module Ci module Ci
module PipelineCreation module Pipelines
class AddJobService class AddJobService
attr_reader :pipeline attr_reader :pipeline
......
...@@ -35,7 +35,7 @@ module Ci ...@@ -35,7 +35,7 @@ module Ci
check_access!(build) check_access!(build)
new_build = clone_build(build) new_build = clone_build(build)
::Ci::PipelineCreation::AddJobService.new(build.pipeline).execute(new_build) ::Ci::Pipelines::AddJobService.new(build.pipeline).execute(new_build)
build.reset # refresh the data to get new values of `retried` and `processed`. build.reset # refresh the data to get new values of `retried` and `processed`.
new_build new_build
......
...@@ -32,7 +32,7 @@ module Projects ...@@ -32,7 +32,7 @@ module Projects
# Create status notifying the deployment of pages # Create status notifying the deployment of pages
@status = build_commit_status @status = build_commit_status
::Ci::PipelineCreation::AddJobService.new(@build.pipeline).execute(@status) ::Ci::Pipelines::AddJobService.new(@build.pipeline).execute(@status)
@status.enqueue! @status.enqueue!
@status.run! @status.run!
......
...@@ -100,7 +100,7 @@ module API ...@@ -100,7 +100,7 @@ module API
status.assign_attributes(attributes_for_keys(updatable_optional_attributes)) status.assign_attributes(attributes_for_keys(updatable_optional_attributes))
if status.valid? if status.valid?
::Ci::PipelineCreation::AddJobService.new(pipeline).execute(status, save: false) ::Ci::Pipelines::AddJobService.new(pipeline).execute(status, save: false)
else else
render_validation_error!(status) render_validation_error!(status)
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Ci::PipelineCreation::AddJobService do RSpec.describe Ci::Pipelines::AddJobService do
let_it_be(:pipeline) { create(:ci_pipeline) } let_it_be(:pipeline) { create(:ci_pipeline) }
let(:job) { build(:ci_build) } let(:job) { build(:ci_build) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment