diff options
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/build.rb | 6 | ||||
-rw-r--r-- | app/models/ci/pipeline.rb | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index faa160ad6ba..42d30d56aa2 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -139,9 +139,11 @@ module Ci end def retry(build, current_user) + # rubocop: disable CodeReuse/ServiceClass Ci::RetryBuildService .new(build.project, current_user) .execute(build) + # rubocop: enable CodeReuse/ServiceClass end end @@ -224,11 +226,13 @@ module Ci self.when == 'manual' end + # rubocop: disable CodeReuse/ServiceClass def play(current_user) Ci::PlayBuildService .new(project, current_user) .execute(self) end + # rubocop: enable CodeReuse/ServiceClass def cancelable? active? || created? @@ -385,9 +389,11 @@ module Ci update(coverage: coverage) if coverage.present? end + # rubocop: disable CodeReuse/ServiceClass def parse_trace_sections! ExtractSectionsFromBuildTraceService.new(project, user).execute(self) end + # rubocop: enable CodeReuse/ServiceClass def trace Gitlab::Ci::Trace.new(self) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 2955e0b2bca..4295c46e689 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -387,10 +387,12 @@ module Ci end end + # rubocop: disable CodeReuse/ServiceClass def retry_failed(current_user) Ci::RetryPipelineService.new(project, current_user) .execute(self) end + # rubocop: enable CodeReuse/ServiceClass def mark_as_processable_after_stage(stage_idx) builds.skipped.after_stage(stage_idx).find_each(&:process) @@ -525,9 +527,11 @@ module Ci project.notes.for_commit_id(sha) end + # rubocop: disable CodeReuse/ServiceClass def process! Ci::ProcessPipelineService.new(project, user).execute(self) end + # rubocop: enable CodeReuse/ServiceClass def update_status retry_optimistic_lock(self) do |