diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-05-21 01:56:19 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-05-28 18:06:29 +0300 |
commit | c86fa0e45e4a053090b5c17b9678120e39f696a6 (patch) | |
tree | 177623aae61915a5d23701ab8428c264261b0724 /app/models | |
parent | 9e6f37744a7f30a181879a1e2799e129c5e795c9 (diff) |
Rename with_all_reports to with_reports
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/job_artifact.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb index 16fa77e0048..0dbeab30498 100644 --- a/app/models/ci/job_artifact.rb +++ b/app/models/ci/job_artifact.rb @@ -26,10 +26,13 @@ module Ci metrics: 'metrics.txt' }.freeze - TYPE_AND_FORMAT_PAIRS = { + INTERNAL_TYPES = { archive: :zip, metadata: :gzip, - trace: :raw, + trace: :raw + }.freeze + + REPORT_TYPES = { junit: :gzip, metrics: :gzip, @@ -45,6 +48,8 @@ module Ci performance: :raw }.freeze + TYPE_AND_FORMAT_PAIRS = INTERNAL_TYPES.merge(REPORT_TYPES).freeze + belongs_to :project belongs_to :job, class_name: "Ci::Build", foreign_key: :job_id @@ -66,8 +71,8 @@ module Ci where(file_type: types) end - scope :with_all_reports, -> do - where(file_type: self.file_types.values.drop(3)) + scope :with_reports, -> do + with_file_types(REPORT_TYPES.keys.map(&:to_s)) end scope :test_reports, -> do |