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
ebd69c5f
Commit
ebd69c5f
authored
Dec 28, 2015
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove artifacts metadata column from database
parent
304c39b6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
18 deletions
+8
-18
app/controllers/projects/artifacts_controller.rb
app/controllers/projects/artifacts_controller.rb
+1
-4
app/models/ci/build.rb
app/models/ci/build.rb
+4
-2
app/views/projects/artifacts/browse.html.haml
app/views/projects/artifacts/browse.html.haml
+3
-0
db/fixtures/development/14_builds.rb
db/fixtures/development/14_builds.rb
+0
-7
db/migrate/20151216111502_add_artifacts_metadata_to_ci_build.rb
...rate/20151216111502_add_artifacts_metadata_to_ci_build.rb
+0
-5
No files found.
app/controllers/projects/artifacts_controller.rb
View file @
ebd69c5f
...
...
@@ -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?
...
...
app/models/ci/build.rb
View file @
ebd69c5f
...
...
@@ -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
...
...
app/views/projects/artifacts/browse.html.haml
View file @
ebd69c5f
...
...
@@ -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
db/fixtures/development/14_builds.rb
View file @
ebd69c5f
...
...
@@ -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
...
...
db/migrate/20151216111502_add_artifacts_metadata_to_ci_build.rb
deleted
100644 → 0
View file @
304c39b6
class
AddArtifactsMetadataToCiBuild
<
ActiveRecord
::
Migration
def
change
add_column
:ci_builds
,
:artifacts_metadata
,
:text
,
limit:
4294967295
end
end
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