Commit bc333f38 authored by Kamil Trzciński's avatar Kamil Trzciński

Support licenses and performance

This introduces a new syntax for all licenses and performance jobs:

```yaml
job:
  reports:
    performance: performance.json
    license_management: gl-license-management-report.json
```
parent 44a9231d
......@@ -19,7 +19,9 @@ module Ci
sast: 'gl-sast-report.json',
dependency_scanning: 'gl-dependency-scanning-report.json',
container_scanning: 'gl-container-scanning-report.json',
dast: 'gl-dast-report.json'
dast: 'gl-dast-report.json',
license_management: 'gl-license-management-report.json',
performance: 'performance.json'
}.freeze
TYPE_AND_FORMAT_PAIRS = {
......@@ -35,7 +37,9 @@ module Ci
sast: :raw,
dependency_scanning: :raw,
container_scanning: :raw,
dast: :raw
dast: :raw,
license_management: :raw,
performance: :raw
}.freeze
belongs_to :project
......@@ -80,7 +84,9 @@ module Ci
dependency_scanning: 6, ## EE-specific
container_scanning: 7, ## EE-specific
dast: 8, ## EE-specific
codequality: 9 ## EE-specific
codequality: 9, ## EE-specific
license_management: 10, ## EE-specific
performance: 11 ## EE-specific
}
enum file_format: {
......
---
title: Support licenses and performance
merge_request:
author:
type: added
......@@ -11,7 +11,7 @@ module Gitlab
include Validatable
include Attributable
ALLOWED_KEYS = %i[junit codequality sast dependency_scanning container_scanning dast].freeze
ALLOWED_KEYS = %i[junit codequality sast dependency_scanning container_scanning dast performance license_management].freeze
attributes ALLOWED_KEYS
......@@ -26,6 +26,8 @@ module Gitlab
validates :dependency_scanning, array_of_strings_or_string: true
validates :container_scanning, array_of_strings_or_string: true
validates :dast, array_of_strings_or_string: true
validates :performance, array_of_strings_or_string: true
validates :license_management, array_of_strings_or_string: true
end
end
......
......@@ -38,6 +38,8 @@ describe Gitlab::Ci::Config::Entry::Reports do
:dependency_scanning | 'gl-dependency-scanning-report.json'
:container_scanning | 'gl-container-scanning-report.json'
:dast | 'gl-dast-report.json'
:license_management | 'gl-license-management-report.json'
:performance | 'performance.json'
end
with_them do
......
......@@ -27,6 +27,7 @@ describe Ci::RetryBuildService do
job_artifacts_metadata job_artifacts_trace job_artifacts_junit
job_artifacts_sast job_artifacts_dependency_scanning
job_artifacts_container_scanning job_artifacts_dast
job_artifacts_license_management job_artifacts_performance
job_artifacts_codequality scheduled_at].freeze
IGNORE_ACCESSORS =
......
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