Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2015-12-30 16:41:44 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 14:48:14 +0300
commit662f4b9e1dec8e461c4ea8da3ccc46a259d9d205 (patch)
tree67560291d8f60faf7da1adf18f38626c6039bcbf /app/models/ci/build.rb
parentc177784d5af6b47ae613f922e075a38fc56ad711 (diff)
Add artifacts metadata uploader filed
Artifacts metadata field will be used to store a filename of gzipped file containing metadata definition for given artifacts archive.
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index ee82fe824c5..98f9e6911f2 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -30,6 +30,7 @@
# description :string(255)
# artifacts_file :text
# gl_project_id :integer
+# artifacts_metadata :text
#
module Ci
@@ -50,6 +51,7 @@ module Ci
scope :similar, ->(build) { where(ref: build.ref, tag: build.tag, trigger_request_id: build.trigger_request_id) }
mount_uploader :artifacts_file, ArtifactUploader
+ mount_uploader :artifacts_metadata, ArtifactUploader
acts_as_taggable
@@ -344,11 +346,11 @@ module Ci
def artifacts_browser_supported?
# TODO, since carrierwave 0.10.0 we will be able to check mime type here
#
- artifacts? && artifacts_file.path.end_with?('zip')
+ artifacts? && artifacts_file.path.end_with?('zip') && artifacts_metadata.exists?
end
- def artifacts_metadata(path)
- []
+ def artifacts_metadata_for(path)
+ {}
end
private