summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects/artifacts_controller.rb5
-rw-r--r--app/models/ci/build.rb6
-rw-r--r--app/views/projects/artifacts/browse.html.haml3
-rw-r--r--db/fixtures/development/14_builds.rb7
-rw-r--r--db/migrate/20151216111502_add_artifacts_metadata_to_ci_build.rb5
5 files changed, 8 insertions, 18 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index 4524127e8e5..399aa11fcbe 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -16,6 +16,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
def browse
current_path = params[:path] ? "./#{params[:path]}/" : './'
+ artifacts_metadata = build.artifacts_metadata(current_path)
@path = Gitlab::StringPath.new(current_path, artifacts_metadata)
end
@@ -29,10 +30,6 @@ class Projects::ArtifactsController < Projects::ApplicationController
@artifacts_file ||= build.artifacts_file
end
- def artifacts_metadata
- @artifacts_metadata ||= build.artifacts_metadata
- end
-
def authorize_download_build_artifacts!
unless can?(current_user, :download_build_artifacts, @project)
if current_user.nil?
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 11b707e57a0..347022ff29b 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -30,7 +30,6 @@
# description :string(255)
# artifacts_file :text
# gl_project_id :integer
-# artifacts_metadata :text
#
module Ci
@@ -41,7 +40,6 @@ module Ci
belongs_to :trigger_request, class_name: 'Ci::TriggerRequest'
serialize :options
- serialize :artifacts_metadata
validates :coverage, numericality: true, allow_blank: true
validates_presence_of :ref
@@ -336,6 +334,10 @@ module Ci
project.execute_services(build_data.dup, :build_hooks)
end
+ def artifacts_metadata(path)
+ []
+ end
+
private
def yaml_variables
diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml
index 141fea9a6d4..f05e5d58265 100644
--- a/app/views/projects/artifacts/browse.html.haml
+++ b/app/views/projects/artifacts/browse.html.haml
@@ -18,3 +18,6 @@
%th Download
= render partial: 'tree_directory', collection: @path.directories!, as: :directory
= render partial: 'tree_file', collection: @path.files, as: :file
+
+- if @path.children.empty?
+ .center Empty
diff --git a/db/fixtures/development/14_builds.rb b/db/fixtures/development/14_builds.rb
index 2e15f30adbb..e625fd6b75a 100644
--- a/db/fixtures/development/14_builds.rb
+++ b/db/fixtures/development/14_builds.rb
@@ -12,7 +12,6 @@ class Gitlab::Seeder::Builds
FileUtils.copy(artifacts_path, artifacts_cache_file_path)
File.open(artifacts_cache_file_path, 'r') do |file|
build.artifacts_file = file
- build.artifacts_metadata = artifacts_metadata
end
begin
@@ -57,12 +56,6 @@ class Gitlab::Seeder::Builds
def artifacts_cache_file_path
artifacts_path.to_s.gsub('ci_', "p#{@project.id}_")
end
-
- def artifacts_metadata
- return @artifacts_metadata if @artifacts_metadata
- logs, _exit_status = Gitlab::Popen.popen(%W(tar tzf #{artifacts_path}))
- @artifacts_metadata = logs.split(/\n/)
- end
end
Gitlab::Seeder.quiet do
diff --git a/db/migrate/20151216111502_add_artifacts_metadata_to_ci_build.rb b/db/migrate/20151216111502_add_artifacts_metadata_to_ci_build.rb
deleted file mode 100644
index d87f9f058fb..00000000000
--- a/db/migrate/20151216111502_add_artifacts_metadata_to_ci_build.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-class AddArtifactsMetadataToCiBuild < ActiveRecord::Migration
- def change
- add_column :ci_builds, :artifacts_metadata, :text, limit: 4294967295
- end
-end