Add initial fixtures for CI builds
This commit is contained in:
parent
d032c5b90e
commit
ff2d1dd2e8
1 changed files with 12 additions and 0 deletions
12
db/fixtures/development/14_builds.rb
Normal file
12
db/fixtures/development/14_builds.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue