Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-11-01 14:21:25 +0300
committerShinya Maeda <shinya@gitlab.com>2018-11-01 14:21:25 +0300
commit1ac4a7fed376ba8dd1e692af0e197d55cc1cb900 (patch)
tree4782e48fba98b0400a3d486dc99dffe0b8d01646 /app/workers/build_success_worker.rb
parent34bd4866c161bc02333b0e9e7a710110885e8bd0 (diff)
parent7aade362361af7eedf1db50dc46369187fce21cc (diff)
Merge branch 'stateful_deployments' into add-action-to-deployment
Diffstat (limited to 'app/workers/build_success_worker.rb')
-rw-r--r--app/workers/build_success_worker.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/build_success_worker.rb b/app/workers/build_success_worker.rb
index f3530317090..1623d8f02b9 100644
--- a/app/workers/build_success_worker.rb
+++ b/app/workers/build_success_worker.rb
@@ -22,6 +22,8 @@ class BuildSuccessWorker
# Therefore we no longer need to create a deployment, after a build succeeded.
# We're leaving this code for the transition period, but we can remove this code in 11.6.
def create_deployment(build)
+ return if build.has_deployment?
+
build.create_deployment.try do |deployment|
deployment.succeed
end