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
bb45d693
Commit
bb45d693
authored
Jul 06, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All artifacts are now browsable
parent
1173ed14
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
35 deletions
+6
-35
app/models/ci/build.rb
app/models/ci/build.rb
+0
-4
app/views/projects/artifacts/_tree_file.html.haml
app/views/projects/artifacts/_tree_file.html.haml
+2
-5
changelogs/unreleased-ee/enable-browsing-artifacts.yml
changelogs/unreleased-ee/enable-browsing-artifacts.yml
+4
-0
spec/models/ci/build_spec.rb
spec/models/ci/build_spec.rb
+0
-26
No files found.
app/models/ci/build.rb
View file @
bb45d693
...
...
@@ -298,10 +298,6 @@ module Ci
artifacts_metadata?
end
def
downloadable_single_artifacts_file?
artifacts_metadata?
&&
artifacts_file
.
file_storage?
end
def
artifacts_metadata?
artifacts?
&&
artifacts_metadata
.
exists?
end
...
...
app/views/projects/artifacts/_tree_file.html.haml
View file @
bb45d693
-
path_to_file
=
file_project_job_artifacts_path
(
@project
,
@build
,
path:
file
.
path
)
if
@build
.
downloadable_single_artifacts_file?
-
path_to_file
=
file_project_job_artifacts_path
(
@project
,
@build
,
path:
file
.
path
)
%tr
.tree-item
{
'data-link'
=>
path_to_file
}
-
blob
=
file
.
blob
%td
.tree-item-file-name
=
tree_icon
(
'file'
,
blob
.
mode
,
blob
.
name
)
%span
.str-truncated
-
if
path_to_file
=
link_to
file
.
name
,
path_to_file
-
else
=
file
.
name
=
link_to
file
.
name
,
path_to_file
%td
=
number_to_human_size
(
blob
.
size
,
precision:
2
)
changelogs/unreleased-ee/enable-browsing-artifacts.yml
0 → 100644
View file @
bb45d693
---
title
:
All artifacts are now browsable
merge_request
:
author
:
spec/models/ci/build_spec.rb
View file @
bb45d693
...
...
@@ -143,32 +143,6 @@ describe Ci::Build, :models do
end
end
describe
'#downloadable_single_artifacts_file?'
do
let
(
:build
)
{
create
(
:ci_build
,
:artifacts
,
artifacts_file_store:
store
)
}
subject
{
build
.
downloadable_single_artifacts_file?
}
before
do
expect_any_instance_of
(
Ci
::
Build
).
to
receive
(
:artifacts_metadata?
).
and_call_original
end
context
'artifacts are stored locally'
do
let
(
:store
)
{
ObjectStoreUploader
::
LOCAL_STORE
}
it
{
is_expected
.
to
be_truthy
}
end
context
'artifacts are stored remotely'
do
let
(
:store
)
{
ObjectStoreUploader
::
REMOTE_STORE
}
before
do
stub_artifacts_object_storage
end
it
{
is_expected
.
to
be_falsey
}
end
end
describe
'#artifacts_expired?'
do
subject
{
build
.
artifacts_expired?
}
...
...
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