summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-11-04 16:35:22 +0100
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-11-08 16:50:03 -0600
commitc70acb57f5adcd4f0a19f8e7d5bcb356464a9c64 (patch)
tree42d3d2c4d8cfabb29c3144ff2a17591dc5f16d2b /app/workers
parent73467bd1634898632d1c9c4e5879546ec9f53032 (diff)
downloadgitlab-ce-c70acb57f5adcd4f0a19f8e7d5bcb356464a9c64.tar.gz
Expose `last_deployment` on `Ci::Builds` [ci skip]
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/build_success_worker.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/workers/build_success_worker.rb b/app/workers/build_success_worker.rb
index e0ad5268664..1bc9745ecbc 100644
--- a/app/workers/build_success_worker.rb
+++ b/app/workers/build_success_worker.rb
@@ -4,15 +4,13 @@ class BuildSuccessWorker
def perform(build_id)
Ci::Build.find_by(id: build_id).try do |build|
- create_deployment(build)
+ create_deployment(build) if build.deployable?
end
end
private
def create_deployment(build)
- return if build.environment.blank?
-
service = CreateDeploymentService.new(
build.project, build.user,
environment: build.environment,