diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/process_build_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/ci/process_build_service.rb b/app/services/ci/process_build_service.rb index eb92c7d1a27..12cdca24066 100644 --- a/app/services/ci/process_build_service.rb +++ b/app/services/ci/process_build_service.rb @@ -3,7 +3,7 @@ module Ci class ProcessBuildService < BaseService def execute(build, current_status) - if valid_statuses_for_when(build.when).include?(current_status) + if valid_statuses_for_build(build).include?(current_status) if build.schedulable? build.schedule elsif build.action? @@ -25,10 +25,10 @@ module Ci build.enqueue end - def valid_statuses_for_when(value) - case value + def valid_statuses_for_build(build) + case build.when when 'on_success' - %w[success skipped] + build.scheduling_type_dag? ? %w[success] : %w[success skipped] when 'on_failure' %w[failed] when 'always' |