From 6ca02a41500790b3e9061dd8836540955b9aaf7c Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 5 Dec 2017 14:31:33 +0000 Subject: Merge branch 'zj-multiple-artifacts-ee' into 'master' Multiple artifacts ee See merge request gitlab-org/gitlab-ee!3276 --- app/models/ci/build.rb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'app/models/ci/build.rb') 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( -- cgit v1.2.1