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
Jérome Perrin
gitlab-ce
Commits
002f314f
Commit
002f314f
authored
Jan 26, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose current_path
parent
b9692501
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
app/uploaders/job_artifact_uploader.rb
app/uploaders/job_artifact_uploader.rb
+5
-3
lib/gitlab/ci/trace.rb
lib/gitlab/ci/trace.rb
+6
-6
No files found.
app/uploaders/job_artifact_uploader.rb
View file @
002f314f
...
...
@@ -14,9 +14,11 @@ class JobArtifactUploader < GitlabUploader
end
def
open
raise
'Only File System is supported'
unless
file_storage?
File
.
open
(
path
)
if
path
if
file_storage?
File
.
open
(
path
,
"rb"
)
else
raise
'Only File System is supported'
end
end
private
...
...
lib/gitlab/ci/trace.rb
View file @
002f314f
...
...
@@ -101,6 +101,12 @@ module Gitlab
job
.
erase_old_trace!
end
def
current_path
@current_path
||=
paths
.
find
do
|
trace_path
|
File
.
exist?
(
trace_path
)
end
end
private
def
ensure_path
...
...
@@ -116,12 +122,6 @@ module Gitlab
end
end
def
current_path
@current_path
||=
paths
.
find
do
|
trace_path
|
File
.
exist?
(
trace_path
)
end
end
##
# This method doesn't include the latest path, which is JobArtifactUploader#default_path,
# Because, in EE, traces can be moved to ObjectStorage, so checking paths in Filestorage doesn't make sense.
...
...
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