summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-01-18 19:15:00 +0900
committerShinya Maeda <shinya@gitlab.com>2019-01-18 19:29:43 +0900
commit91c1dc578eba70417b05ef0edd961f0717e10c43 (patch)
treefee045a72d0978b1de4e0afb786e327fa950a1de /app
parent35c3cb7c480e812d3c6dcd8f8e2eb6c6a2da83b1 (diff)
downloadgitlab-ce-91c1dc578eba70417b05ef0edd961f0717e10c43.tar.gz
Fix runner eternal loop when update job result
Add spec Add changelog
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index dc6f8ae1a7f..cfdb3c0d719 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -224,8 +224,15 @@ module Ci
before_transition any => [:failed] do |build|
next unless build.project
+ next unless build.deployment
- build.deployment&.drop
+ begin
+ build.deployment.drop!
+ rescue => e
+ Gitlab::Sentry.track_exception(e, extra: { build_id: build.id })
+ end
+
+ true
end
after_transition any => [:failed] do |build|