diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-27 09:11:29 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-27 09:11:29 +0200 |
commit | 8c59489c93cf4dec8f4b2abf4ad65ee647c00b3a (patch) | |
tree | a1e723f9984e618ef408f80b702d26bb857a5509 /app/services | |
parent | c848735db6e77b7400ea88f9286bb12ff840a318 (diff) | |
download | gitlab-ce-8c59489c93cf4dec8f4b2abf4ad65ee647c00b3a.tar.gz |
Do not retry jobs multiple times when retrying a pipeline
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/retry_pipeline_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/ci/retry_pipeline_service.rb b/app/services/ci/retry_pipeline_service.rb index 574561adc4c..f72ddbf690c 100644 --- a/app/services/ci/retry_pipeline_service.rb +++ b/app/services/ci/retry_pipeline_service.rb @@ -7,14 +7,14 @@ module Ci raise Gitlab::Access::AccessDeniedError end - pipeline.builds.failed_or_canceled.find_each do |build| + pipeline.builds.latest.failed_or_canceled.find_each do |build| next unless build.retryable? Ci::RetryBuildService.new(project, current_user) .reprocess(build) end - pipeline.builds.skipped.find_each do |skipped| + pipeline.builds.latest.skipped.find_each do |skipped| retry_optimistic_lock(skipped) { |build| build.process } end |