Commit ebd69c5f authored by Grzegorz Bizon's avatar Grzegorz Bizon

Remove artifacts metadata column from database

parent 304c39b6
......@@ -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?
......
......@@ -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
......
......@@ -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
......@@ -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
......
class AddArtifactsMetadataToCiBuild < ActiveRecord::Migration
def change
add_column :ci_builds, :artifacts_metadata, :text, limit: 4294967295
end
end
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