BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9b7a0533
Commit
9b7a0533
authored
Mar 30, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix database trace to read raw
parent
166b4575
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
20 deletions
+12
-20
jobs_controller.rb
app/controllers/projects/jobs_controller.rb
+11
-19
stream.rb
lib/gitlab/ci/trace/stream.rb
+1
-1
No files found.
app/controllers/projects/jobs_controller.rb
View file @
9b7a0533
...
...
@@ -119,17 +119,17 @@ class Projects::JobsController < Projects::ApplicationController
end
def
raw
if
trace_artifact_file
send_upload
(
trace_artifact_file
,
send_params:
raw_send_params
,
redirect_params:
raw_redirect_params
)
else
build
.
trace
.
read
do
|
stream
|
if
stream
.
file?
send_file
stream
.
path
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
else
render_404
end
build
.
trace
.
read
do
|
stream
|
if
trace_artifact_file
send_upload
(
trace_artifact_file
,
send_params:
{
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
},
redirect_params:
{
query:
{
'response-content-type'
=>
'text/plain; charset=utf-8'
,
'response-content-disposition'
=>
'inline'
}
}
)
elsif
stream
.
file?
send_file
stream
.
path
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
elsif
build
.
old_trace
send_data
stream
.
path
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
,
filename:
'job.log'
else
render_404
end
end
end
...
...
@@ -144,14 +144,6 @@ class Projects::JobsController < Projects::ApplicationController
return
access_denied!
unless
can?
(
current_user
,
:erase_build
,
build
)
end
def
raw_send_params
{
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
}
end
def
raw_redirect_params
{
query:
{
'response-content-type'
=>
'text/plain; charset=utf-8'
,
'response-content-disposition'
=>
'inline'
}
}
end
def
trace_artifact_file
@trace_artifact_file
||=
build
.
job_artifacts_trace
&
.
file
end
...
...
lib/gitlab/ci/trace/stream.rb
View file @
9b7a0533
...
...
@@ -22,7 +22,7 @@ module Gitlab
end
def
file?
self
.
path
.
present?
self
.
path
.
present?
if
self
.
respond_to
(
:path
)
end
def
limit
(
last_bytes
=
LIMIT_SIZE
)
...
...
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