diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 18:07:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 18:07:55 +0000 |
commit | 603c7d4cac5e28bc1c75e50c23ed2cbe56f1aafc (patch) | |
tree | 907f5b8ee1b6f5aad396e95e3327a08400b9e8ea /app/models/ci/job_artifact.rb | |
parent | 120f4aaedc8fe830a3f572491d240d8ee6addefb (diff) | |
download | gitlab-ce-603c7d4cac5e28bc1c75e50c23ed2cbe56f1aafc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci/job_artifact.rb')
-rw-r--r-- | app/models/ci/job_artifact.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb index ae57da9c546..ef0701b3874 100644 --- a/app/models/ci/job_artifact.rb +++ b/app/models/ci/job_artifact.rb @@ -31,7 +31,8 @@ module Ci metrics: 'metrics.txt', lsif: 'lsif.json', dotenv: '.env', - cobertura: 'cobertura-coverage.xml' + cobertura: 'cobertura-coverage.xml', + terraform: 'tfplan.json' }.freeze INTERNAL_TYPES = { @@ -59,7 +60,8 @@ module Ci dast: :raw, license_management: :raw, license_scanning: :raw, - performance: :raw + performance: :raw, + terraform: :raw }.freeze TYPE_AND_FORMAT_PAIRS = INTERNAL_TYPES.merge(REPORT_TYPES).freeze @@ -80,6 +82,7 @@ module Ci scope :with_files_stored_locally, -> { where(file_store: [nil, ::JobArtifactUploader::Store::LOCAL]) } scope :with_files_stored_remotely, -> { where(file_store: ::JobArtifactUploader::Store::REMOTE) } scope :for_sha, ->(sha, project_id) { joins(job: :pipeline).where(ci_pipelines: { sha: sha, project_id: project_id }) } + scope :for_job_name, ->(name) { joins(:job).where(ci_builds: { name: name }) } scope :with_file_types, -> (file_types) do types = self.file_types.select { |file_type| file_types.include?(file_type) }.values @@ -129,7 +132,8 @@ module Ci network_referee: 14, ## runner referees lsif: 15, # LSIF data for code navigation dotenv: 16, - cobertura: 17 + cobertura: 17, + terraform: 18 # Transformed json } enum file_format: { |