Commit 7754808a authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-broken-fixture-downstream-pipelines' into 'master'

Fix flaky 25_downstream_pipelines fixture

See merge request gitlab-org/gitlab!18922
parents 593e580d c5606088
...@@ -9,6 +9,10 @@ Gitlab::Seeder.quiet do ...@@ -9,6 +9,10 @@ Gitlab::Seeder.quiet do
.where.not(project: project) .where.not(project: project)
.order('random()').first .order('random()').first
# If the number of created projects is 1 (i.e. env['SIZE'] == 1),
# a target pipeline becomes nil.
next unless target_pipeline
# link to source pipeline # link to source pipeline
pipeline.sourced_pipelines.create!( pipeline.sourced_pipelines.create!(
source_job: pipeline.builds.all.sample, source_job: pipeline.builds.all.sample,
......
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