Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
312c1dce
Commit
312c1dce
authored
Aug 18, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build logs in development environment fixtures
parent
d3af645e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
db/fixtures/development/14_builds.rb
db/fixtures/development/14_builds.rb
+9
-5
No files found.
db/fixtures/development/14_builds.rb
View file @
312c1dce
...
...
@@ -41,7 +41,7 @@ class Gitlab::Seeder::Builds
end
def
create_master_pipelines
@project
.
repository
.
commits
(
'master'
,
limit:
5
).
map
do
|
commit
|
@project
.
repository
.
commits
(
'master'
,
limit:
4
).
map
do
|
commit
|
create_pipeline!
(
@project
,
'master'
,
commit
)
end
rescue
...
...
@@ -49,11 +49,11 @@ class Gitlab::Seeder::Builds
end
def
create_merge_request_pipelines
pipelines
=
@project
.
merge_requests
.
first
(
5
).
map
do
|
merge_request
|
pipelines
=
@project
.
merge_requests
.
first
(
3
).
map
do
|
merge_request
|
project
=
merge_request
.
source_project
branch
=
merge_request
.
source_branch
merge_request
.
commits
.
last
(
5
).
map
do
|
commit
|
merge_request
.
commits
.
last
(
4
).
map
do
|
commit
|
create_pipeline!
(
project
,
branch
,
commit
)
end
end
...
...
@@ -71,7 +71,7 @@ class Gitlab::Seeder::Builds
def
build_create!
(
pipeline
,
opts
=
{})
attributes
=
build_attributes_for
(
pipeline
,
opts
)
Ci
::
Build
.
create!
(
attributes
)
do
|
build
|
Ci
::
Build
.
create!
(
attributes
)
.
tap
do
|
build
|
if
opts
[
:name
].
start_with?
(
'build'
)
artifacts_cache_file
(
artifacts_archive_path
)
do
|
file
|
build
.
artifacts_file
=
file
...
...
@@ -82,8 +82,12 @@ class Gitlab::Seeder::Builds
end
end
##
# We need to set build trace after saving a build (id required)
# That is why we need `#tap` method instead of passing block
# directly to `Ci::Build#create!`.
#
if
%w(running success failed)
.
include?
(
build
.
status
)
# We need to set build trace after saving a build (id required)
build
.
trace
=
FFaker
::
Lorem
.
paragraphs
(
6
).
join
(
"
\n\n
"
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment