diff options
Diffstat (limited to 'app/services')
| -rw-r--r-- | app/services/ci/retry_build_service.rb | 2 | ||||
| -rw-r--r-- | app/services/merge_requests/add_todo_when_build_fails_service.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/services/ci/retry_build_service.rb b/app/services/ci/retry_build_service.rb index d67b9f5cc56..c552193e66b 100644 --- a/app/services/ci/retry_build_service.rb +++ b/app/services/ci/retry_build_service.rb @@ -28,6 +28,8 @@ module Ci attributes.push([:user, current_user]) + build.retried = true + Ci::Build.transaction do # mark all other builds of that name as retried build.pipeline.builds.latest diff --git a/app/services/merge_requests/add_todo_when_build_fails_service.rb b/app/services/merge_requests/add_todo_when_build_fails_service.rb index 727768b1a39..6805b2f7d1c 100644 --- a/app/services/merge_requests/add_todo_when_build_fails_service.rb +++ b/app/services/merge_requests/add_todo_when_build_fails_service.rb @@ -3,7 +3,7 @@ module MergeRequests # Adds a todo to the parent merge_request when a CI build fails # def execute(commit_status) - return if commit_status.allow_failure? + return if commit_status.allow_failure? || commit_status.retried? commit_status_merge_requests(commit_status) do |merge_request| todo_service.merge_request_build_failed(merge_request) |
