Commit 200f9ba8 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'enable-browsing-artifacts' into 'master'

All artifacts are now browsable

Closes #2619

See merge request !2356
parents 8ee10e25 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
......
- 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)
---
title: All artifacts are now browsable
merge_request:
author:
......@@ -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? }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment