diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-03-20 19:27:23 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-03-20 19:27:23 +0300 |
commit | a2d82d4c5522b6d3668481e2fcfc77b0830ce9b6 (patch) | |
tree | 1dbd697794019471ed95ce417bc64ec01e4c64f7 /app | |
parent | 500132e026923cae2a8b769ff1824a00e45bb98c (diff) | |
parent | 9c9c0484f61d6c8198c060c78fcfc9458c16955f (diff) |
Merge branch 'fix-ci-job-auto-retry' into 'master'
Prevent auto-retry AccessDenied error from stopping transition to failed
See merge request gitlab-org/gitlab-ce!17862
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/build.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index e68c1012199..1e066b69c6e 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -140,7 +140,11 @@ module Ci next if build.retries_max.zero? if build.retries_count < build.retries_max - Ci::Build.retry(build, build.user) + begin + Ci::Build.retry(build, build.user) + rescue Gitlab::Access::AccessDeniedError => ex + Rails.logger.error "Unable to auto-retry job #{build.id}: #{ex}" + end end end |