diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-04 16:35:22 +0100 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2016-11-08 16:50:03 -0600 |
commit | c70acb57f5adcd4f0a19f8e7d5bcb356464a9c64 (patch) | |
tree | 42d3d2c4d8cfabb29c3144ff2a17591dc5f16d2b /app/workers | |
parent | 73467bd1634898632d1c9c4e5879546ec9f53032 (diff) | |
download | gitlab-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.rb | 4 |
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, |