summaryrefslogtreecommitdiff
path: root/app/models/ci
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-10-15 12:17:21 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-10-16 13:51:49 +0200
commit15cd91c71a57a0b84af620181a64b26d5aec8237 (patch)
treeecc0f8ed9b7d508b442c111faa199e52fa382924 /app/models/ci
parent63cd88c668130d22f4a3d708894d0283a5941319 (diff)
downloadgitlab-ce-15cd91c71a57a0b84af620181a64b26d5aec8237.tar.gz
Make all legacy security reports to use raw formatuse-raw-file-format
- This introduces and uses `:raw` format for all legacy reports, the ones that do not have yet proper parsers on Backend - Raw format is needed to make Frontend be able to parse reports, without the need of decompressing, - This also extends fixtures to seed security reports with database, even though parser code is part of EE
Diffstat (limited to 'app/models/ci')
-rw-r--r--app/models/ci/job_artifact.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb
index cb73fc74bb6..2b28b702b05 100644
--- a/app/models/ci/job_artifact.rb
+++ b/app/models/ci/job_artifact.rb
@@ -27,11 +27,15 @@ module Ci
metadata: :gzip,
trace: :raw,
junit: :gzip,
- codequality: :gzip,
- sast: :gzip,
- dependency_scanning: :gzip,
- container_scanning: :gzip,
- dast: :gzip
+
+ # All these file formats use `raw` as we need to store them uncompressed
+ # for Frontend to fetch the files and do analysis
+ # When they will be only used by backend, they can be `gzipped`.
+ codequality: :raw,
+ sast: :raw,
+ dependency_scanning: :raw,
+ container_scanning: :raw,
+ dast: :raw
}.freeze
belongs_to :project
@@ -100,7 +104,8 @@ module Ci
}
FILE_FORMAT_ADAPTERS = {
- gzip: Gitlab::Ci::Build::Artifacts::GzipFileAdapter
+ gzip: Gitlab::Ci::Build::Artifacts::Adapters::GzipStream,
+ raw: Gitlab::Ci::Build::Artifacts::Adapters::RawStream
}.freeze
def valid_file_format?