Commit 3c6fee70 authored by Robert Speicher's avatar Robert Speicher

CE-EE parity for pipelines development fixture

parent 8073b055
...@@ -79,7 +79,15 @@ class Gitlab::Seeder::Pipelines ...@@ -79,7 +79,15 @@ class Gitlab::Seeder::Pipelines
def create_master_pipelines def create_master_pipelines
@project.repository.commits('master', limit: 4).map do |commit| @project.repository.commits('master', limit: 4).map do |commit|
create_pipeline!(@project, 'master', commit) create_pipeline!(@project, 'master', commit).tap do |pipeline|
random_pipeline.tap do |triggered_by_pipeline|
triggered_by_pipeline.sourced_pipelines.create(
source_job: triggered_by_pipeline.builds.all.sample,
source_project: triggered_by_pipeline.project,
project: pipeline.project,
pipeline: pipeline)
end
end
end end
rescue rescue
[] []
...@@ -231,6 +239,10 @@ class Gitlab::Seeder::Pipelines ...@@ -231,6 +239,10 @@ class Gitlab::Seeder::Pipelines
@project.team.users.sample @project.team.users.sample
end end
def random_pipeline
Ci::Pipeline.limit(4).all.sample
end
def build_status def build_status
Ci::Build::AVAILABLE_STATUSES.sample Ci::Build::AVAILABLE_STATUSES.sample
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