Commit d9c8cca7 authored by James Lopez's avatar James Lopez

Merge branch 'alexives/207527/add_terraform_report_artifact' into 'master'

Add support for tfplan.json report

See merge request gitlab-org/gitlab!27148
parents 69b6fd12 adc11563
......@@ -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
......@@ -129,7 +131,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: {
......
......@@ -14,7 +14,7 @@ module Gitlab
ALLOWED_KEYS =
%i[junit codequality sast dependency_scanning container_scanning
dast performance license_management license_scanning metrics lsif
dotenv cobertura].freeze
dotenv cobertura terraform].freeze
attributes ALLOWED_KEYS
......@@ -36,6 +36,7 @@ module Gitlab
validates :lsif, array_of_strings_or_string: true
validates :dotenv, array_of_strings_or_string: true
validates :cobertura, array_of_strings_or_string: true
validates :terraform, array_of_strings_or_string: true
end
end
......
......@@ -46,6 +46,7 @@ describe Gitlab::Ci::Config::Entry::Reports do
:lsif | 'lsif.json'
:dotenv | 'build.dotenv'
:cobertura | 'cobertura-coverage.xml'
:terraform | 'tfplan.json'
end
with_them do
......
......@@ -34,6 +34,7 @@ describe Ci::RetryBuildService do
job_artifacts_container_scanning job_artifacts_dast
job_artifacts_license_management job_artifacts_license_scanning
job_artifacts_performance job_artifacts_lsif
job_artifacts_terraform
job_artifacts_codequality job_artifacts_metrics scheduled_at
job_variables waiting_for_resource_at job_artifacts_metrics_referee
job_artifacts_network_referee job_artifacts_dotenv
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment