From edfe6539b4c39caaffce119b8d716e94c86c9169 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Wed, 1 Apr 2015 15:23:01 +0300 Subject: refactoring of deploy job creation --- app/models/commit.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app/models/commit.rb') diff --git a/app/models/commit.rb b/app/models/commit.rb index 32bd334..5f1aa92 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -137,11 +137,9 @@ class Commit < ActiveRecord::Base end def create_deploy_builds(ref) - if builds.empty? || (success? && !last_build.job.deploy?) - project.jobs.deploy.active.each do |job| - if job.run_for_ref?(ref) - create_build_from_job(job) - end + project.jobs.deploy.active.each do |job| + if job.run_for_ref?(ref) + create_build_from_job(job) end end end -- cgit v1.2.1