Commit 67464972 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Make it possible to pass downstream to bridge factory

parent 531626ee
......@@ -10,8 +10,16 @@ FactoryBot.define do
pipeline factory: :ci_pipeline
transient { downstream nil }
after(:build) do |bridge, evaluator|
bridge.project ||= bridge.pipeline.project
if evaluator.downstream.present?
bridge.options = bridge.options.to_h.merge(
trigger: { project: evaluator.downstream.full_path }
)
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment