diff options
Diffstat (limited to 'app/models/ci/bridge.rb')
-rw-r--r-- | app/models/ci/bridge.rb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb index ff444ddefa3..a06b920342c 100644 --- a/app/models/ci/bridge.rb +++ b/app/models/ci/bridge.rb @@ -57,6 +57,14 @@ module Ci end end + def retryable? + return false unless Feature.enabled?(:ci_recreate_downstream_pipeline, project) + + return false if failed? && (pipeline_loop_detected? || reached_max_descendant_pipelines_depth?) + + super + end + def self.with_preloads preload( :metadata, @@ -65,8 +73,11 @@ module Ci ) end - def retryable? - false + def self.clone_accessors + %i[pipeline project ref tag options name + allow_failure stage stage_id stage_idx + yaml_variables when description needs_attributes + scheduling_type].freeze end def inherit_status_from_downstream!(pipeline) @@ -204,7 +215,7 @@ module Ci end def downstream_variables - if ::Feature.enabled?(:ci_trigger_forward_variables, project, default_enabled: :yaml) + if ::Feature.enabled?(:ci_trigger_forward_variables, project) calculate_downstream_variables .reverse # variables priority .uniq { |var| var[:key] } # only one variable key to pass |