diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2015-12-16 15:13:34 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-01-14 12:48:12 +0100 |
commit | ff2d1dd2e87b067336bc7e373662fd05f494f14d (patch) | |
tree | ec92ea85d264cdc2699226f5d329d1ad2a927785 /db | |
parent | d032c5b90ecbd3a9b86fcfabff6417c93101426a (diff) | |
download | gitlab-ce-ff2d1dd2e87b067336bc7e373662fd05f494f14d.tar.gz |
Add initial fixtures for CI builds
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/14_builds.rb | 12 |
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 |