summaryrefslogtreecommitdiff
path: root/app/models/ci/bridge.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/bridge.rb')
-rw-r--r--app/models/ci/bridge.rb20
1 files changed, 15 insertions, 5 deletions
diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb
index 2ff777bfc89..ff444ddefa3 100644
--- a/app/models/ci/bridge.rb
+++ b/app/models/ci/bridge.rb
@@ -57,10 +57,6 @@ module Ci
end
end
- def self.retry(bridge, current_user)
- raise NotImplementedError
- end
-
def self.with_preloads
preload(
:metadata,
@@ -69,6 +65,10 @@ module Ci
)
end
+ def retryable?
+ false
+ end
+
def inherit_status_from_downstream!(pipeline)
case pipeline.status
when 'success'
@@ -274,7 +274,8 @@ module Ci
# The order of this list refers to the priority of the variables
downstream_yaml_variables(expand_variables) +
- downstream_pipeline_variables(expand_variables)
+ downstream_pipeline_variables(expand_variables) +
+ downstream_pipeline_schedule_variables(expand_variables)
end
def downstream_yaml_variables(expand_variables)
@@ -293,6 +294,15 @@ module Ci
end
end
+ def downstream_pipeline_schedule_variables(expand_variables)
+ return [] unless forward_pipeline_variables?
+ return [] unless pipeline.pipeline_schedule
+
+ pipeline.pipeline_schedule.variables.to_a.map do |variable|
+ { key: variable.key, value: ::ExpandVariables.expand(variable.value, expand_variables) }
+ end
+ end
+
def forward_yaml_variables?
strong_memoize(:forward_yaml_variables) do
result = options&.dig(:trigger, :forward, :yaml_variables)