diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-07-18 01:17:02 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-07-22 19:45:05 +0300 |
commit | 3c6fee700d52db4da1b3662caf6e1dfe76f56977 (patch) | |
tree | c877e952ea446a470f0437ab036247da302535dd | |
parent | 8073b0554fc8f7dddc250025aaf5cedd09f423cb (diff) |
CE-EE parity for pipelines development fixture
-rw-r--r-- | db/fixtures/development/14_pipelines.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/db/fixtures/development/14_pipelines.rb b/db/fixtures/development/14_pipelines.rb index db043e39d2c..ffba934021e 100644 --- a/db/fixtures/development/14_pipelines.rb +++ b/db/fixtures/development/14_pipelines.rb @@ -79,7 +79,15 @@ class Gitlab::Seeder::Pipelines def create_master_pipelines @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 rescue [] @@ -231,6 +239,10 @@ class Gitlab::Seeder::Pipelines @project.team.users.sample end + def random_pipeline + Ci::Pipeline.limit(4).all.sample + end + def build_status Ci::Build::AVAILABLE_STATUSES.sample end |