diff options
-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 |