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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
32b750fe
Commit
32b750fe
authored
Jan 26, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send raw trace from ObjectStorage
parent
32fbe618
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
app/controllers/projects/jobs_controller.rb
app/controllers/projects/jobs_controller.rb
+24
-5
No files found.
app/controllers/projects/jobs_controller.rb
View file @
32b750fe
class
Projects::JobsController
<
Projects
::
ApplicationController
class
Projects::JobsController
<
Projects
::
ApplicationController
include
SendFileUpload
before_action
:build
,
except:
[
:index
,
:cancel_all
]
before_action
:build
,
except:
[
:index
,
:cancel_all
]
before_action
:authorize_read_build!
,
before_action
:authorize_read_build!
,
...
@@ -117,6 +119,18 @@ class Projects::JobsController < Projects::ApplicationController
...
@@ -117,6 +119,18 @@ class Projects::JobsController < Projects::ApplicationController
end
end
def
raw
def
raw
if
trace_artifact
send_upload
(
trace_artifact
.
file
,
send_params:
{
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
},
redirect_params:
{
query:
{
"response-content-disposition"
=>
"inline"
}
}
)
else
build
.
trace
.
read
do
|
stream
|
build
.
trace
.
read
do
|
stream
|
if
stream
.
file?
if
stream
.
file?
send_file
stream
.
path
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
send_file
stream
.
path
,
type:
'text/plain; charset=utf-8'
,
disposition:
'inline'
...
@@ -125,6 +139,7 @@ class Projects::JobsController < Projects::ApplicationController
...
@@ -125,6 +139,7 @@ class Projects::JobsController < Projects::ApplicationController
end
end
end
end
end
end
end
private
private
...
@@ -144,4 +159,8 @@ class Projects::JobsController < Projects::ApplicationController
...
@@ -144,4 +159,8 @@ class Projects::JobsController < Projects::ApplicationController
def
build_path
(
build
)
def
build_path
(
build
)
project_job_path
(
build
.
project
,
build
)
project_job_path
(
build
.
project
,
build
)
end
end
def
trace_artifact
build
.
job_artifacts_trace
end
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