From ff2d1dd2e87b067336bc7e373662fd05f494f14d Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 16 Dec 2015 15:13:34 +0100 Subject: Add initial fixtures for CI builds --- db/fixtures/development/14_builds.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/fixtures/development/14_builds.rb (limited to 'db/fixtures') diff --git a/db/fixtures/development/14_builds.rb b/db/fixtures/development/14_builds.rb new file mode 100644 index 00000000000..ac3bd1e9d63 --- /dev/null +++ b/db/fixtures/development/14_builds.rb @@ -0,0 +1,12 @@ +Gitlab::Seeder.quiet do + project = Project.first + commits = project.repository.commits('master', nil, 10) + commits_sha = commits.map { |commit| commit.raw.id } + ci_commits = commits_sha.map do |sha| + project.ensure_ci_commit(sha) + end + + ci_commits.each do |ci_commit| + ci_commit.create_builds('master', nil, User.first) + end +end -- cgit v1.2.1