summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2015-12-16 15:13:34 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 12:48:12 +0100
commitff2d1dd2e87b067336bc7e373662fd05f494f14d (patch)
treeec92ea85d264cdc2699226f5d329d1ad2a927785 /db
parentd032c5b90ecbd3a9b86fcfabff6417c93101426a (diff)
downloadgitlab-ce-ff2d1dd2e87b067336bc7e373662fd05f494f14d.tar.gz
Add initial fixtures for CI builds
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/14_builds.rb12
1 files changed, 12 insertions, 0 deletions
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