Skip to content
Snippets Groups Projects
Commit f43497d0 authored by Alex Ives's avatar Alex Ives :speech_balloon:
Browse files

Add support for tfplan.json report

Added support for `terraform` report type in ci yml. This is a special
json file added as a part of !26830
to handle showing terraform results in merge requests

Relates to #207527
parent acb9e825
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,8 @@ class JobArtifact < ApplicationRecord
license_scanning: 'gl-license-scanning-report.json',
performance: 'performance.json',
metrics: 'metrics.txt',
lsif: 'lsif.json'
lsif: 'lsif.json',
terraform: 'tfplan.json'
}.freeze
INTERNAL_TYPES = {
......@@ -54,7 +55,8 @@ class JobArtifact < ApplicationRecord
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
......@@ -118,7 +120,8 @@ class JobArtifact < ApplicationRecord
metrics: 12, ## EE-specific
metrics_referee: 13, ## runner referees
network_referee: 14, ## runner referees
lsif: 15 # LSIF data for code navigation
lsif: 15, # LSIF data for code navigation
terraform: 16 # Transformed json
}
enum file_format: {
......
---
title: Add support for tfplan.json report
merge_request: 27148
author:
type: added
......@@ -11,7 +11,7 @@ class Reports < ::Gitlab::Config::Entry::Node
include ::Gitlab::Config::Entry::Validatable
include ::Gitlab::Config::Entry::Attributable
ALLOWED_KEYS = %i[junit codequality sast dependency_scanning container_scanning dast performance license_management license_scanning metrics lsif].freeze
ALLOWED_KEYS = %i[junit codequality sast dependency_scanning container_scanning dast performance license_management license_scanning metrics lsif terraform].freeze
attributes ALLOWED_KEYS
......@@ -31,6 +31,7 @@ class Reports < ::Gitlab::Config::Entry::Node
validates :license_scanning, array_of_strings_or_string: true
validates :metrics, array_of_strings_or_string: true
validates :lsif, array_of_strings_or_string: true
validates :terraform, array_of_strings_or_string: true
end
end
......
......@@ -44,6 +44,7 @@
:license_scanning | 'gl-license-scanning-report.json'
:performance | 'performance.json'
:lsif | 'lsif.json'
:terraform | 'tfplan.json'
end
with_them do
......
......@@ -34,6 +34,7 @@
job_artifacts_container_scanning job_artifacts_dast
job_artifacts_license_management job_artifacts_license_scanning
job_artifacts_performance job_artifacts_lsif
job_artifacts_performance 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 needs].freeze
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment