summaryrefslogtreecommitdiff
path: root/app/models/ci/build.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2017-12-05 14:31:33 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-02-28 20:44:09 +0100
commit6ca02a41500790b3e9061dd8836540955b9aaf7c (patch)
tree5c66c4826cafa2657fe25d85eb9e189b5f290f32 /app/models/ci/build.rb
parentec72abf53fd82ca3e7f126536a83b27b368696ec (diff)
downloadgitlab-ce-6ca02a41500790b3e9061dd8836540955b9aaf7c.tar.gz
Merge branch 'zj-multiple-artifacts-ee' into 'master'
Multiple artifacts ee See merge request gitlab-org/gitlab-ee!3276
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index ddd075e1fcb..7cf8bdd968b 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -45,7 +45,7 @@ module Ci
end
scope :with_artifacts_not_expired, ->() { with_artifacts.where('artifacts_expire_at IS NULL OR artifacts_expire_at > ?', Time.now) }
scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) }
- scope :with_artifacts_stored_locally, ->() { with_artifacts.where(artifacts_file_store: [nil, ArtifactUploader::LOCAL_STORE]) }
+ scope :with_artifacts_stored_locally, ->() { with_artifacts.where(artifacts_file_store: [nil, LegacyArtifactUploader::LOCAL_STORE]) }
scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) }
scope :manual_actions, ->() { where(when: :manual, status: COMPLETED_STATUSES + [:manual]) }
scope :ref_protected, -> { where(protected: true) }
@@ -361,22 +361,10 @@ module Ci
project.running_or_pending_build_count(force: true)
end
- def artifacts?
- !artifacts_expired? && artifacts_file.exists?
- end
-
def browsable_artifacts?
artifacts_metadata?
end
- def downloadable_single_artifacts_file?
- artifacts_metadata? && artifacts_file.file_storage?
- end
-
- def artifacts_metadata?
- artifacts? && artifacts_metadata.exists?
- end
-
def artifacts_metadata_entry(path, **options)
artifacts_metadata.use_file do |metadata_path|
metadata = Gitlab::Ci::Build::Artifacts::Metadata.new(