Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8715e59a
Commit
8715e59a
authored
Jan 13, 2020
by
Tetiana Chupryna
Committed by
Ash McKenzie
Jan 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename file constant
License Management -> License Scanning
parent
a46af619
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
ee/app/models/ee/ci/build.rb
ee/app/models/ee/ci/build.rb
+2
-2
ee/app/models/ee/ci/job_artifact.rb
ee/app/models/ee/ci/job_artifact.rb
+3
-3
ee/app/models/ee/ci/pipeline.rb
ee/app/models/ee/ci/pipeline.rb
+3
-3
ee/app/models/ee/merge_request.rb
ee/app/models/ee/merge_request.rb
+1
-1
ee/app/models/sca/license_compliance.rb
ee/app/models/sca/license_compliance.rb
+1
-1
ee/spec/models/ee/ci/job_artifact_spec.rb
ee/spec/models/ee/ci/job_artifact_spec.rb
+2
-2
No files found.
ee/app/models/ee/ci/build.rb
View file @
8715e59a
...
...
@@ -68,7 +68,7 @@ module EE
end
def
collect_license_scanning_reports!
(
license_scanning_report
)
each_report
(
::
Ci
::
JobArtifact
::
LICENSE_
MANAGEMENT
_REPORT_FILE_TYPES
)
do
|
file_type
,
blob
|
each_report
(
::
Ci
::
JobArtifact
::
LICENSE_
SCANNING
_REPORT_FILE_TYPES
)
do
|
file_type
,
blob
|
next
if
::
Feature
.
disabled?
(
:parse_license_management_reports
,
default_enabled:
true
)
next
unless
project
.
feature_available?
(
:license_management
)
...
...
@@ -95,7 +95,7 @@ module EE
if
project
.
feature_available?
(
:dependency_scanning
)
dependency_list
=
::
Gitlab
::
Ci
::
Parsers
::
Security
::
DependencyList
.
new
(
project
,
sha
)
each_report
(
::
Ci
::
JobArtifact
::
LICENSE_
MANAGEMENT
_REPORT_FILE_TYPES
)
do
|
_
,
blob
|
each_report
(
::
Ci
::
JobArtifact
::
LICENSE_
SCANNING
_REPORT_FILE_TYPES
)
do
|
_
,
blob
|
dependency_list
.
parse_licenses!
(
blob
,
dependency_list_report
)
end
end
...
...
ee/app/models/ee/ci/job_artifact.rb
View file @
8715e59a
...
...
@@ -12,7 +12,7 @@ module EE
after_destroy
:log_geo_deleted_event
SECURITY_REPORT_FILE_TYPES
=
%w[sast dependency_scanning container_scanning dast]
.
freeze
LICENSE_
MANAGEMENT
_REPORT_FILE_TYPES
=
%w[license_management license_scanning]
.
freeze
LICENSE_
SCANNING
_REPORT_FILE_TYPES
=
%w[license_management license_scanning]
.
freeze
DEPENDENCY_LIST_REPORT_FILE_TYPES
=
%w[dependency_scanning]
.
freeze
METRICS_REPORT_FILE_TYPES
=
%w[metrics]
.
freeze
CONTAINER_SCANNING_REPORT_TYPES
=
%w[container_scanning]
.
freeze
...
...
@@ -27,8 +27,8 @@ module EE
with_file_types
(
SECURITY_REPORT_FILE_TYPES
)
end
scope
:license_
management
_reports
,
->
do
with_file_types
(
LICENSE_
MANAGEMENT
_REPORT_FILE_TYPES
)
scope
:license_
scanning
_reports
,
->
do
with_file_types
(
LICENSE_
SCANNING
_REPORT_FILE_TYPES
)
end
scope
:dependency_list_reports
,
->
do
...
...
ee/app/models/ee/ci/pipeline.rb
View file @
8715e59a
...
...
@@ -51,7 +51,7 @@ module EE
state_machine
:status
do
after_transition
any
=>
::
Ci
::
Pipeline
.
completed_statuses
do
|
pipeline
|
next
unless
pipeline
.
has_reports?
(
::
Ci
::
JobArtifact
.
security_reports
.
or
(
::
Ci
::
JobArtifact
.
license_
management
_reports
))
next
unless
pipeline
.
has_reports?
(
::
Ci
::
JobArtifact
.
security_reports
.
or
(
::
Ci
::
JobArtifact
.
license_
scanning
_reports
))
pipeline
.
run_after_commit
do
StoreSecurityReportsWorker
.
perform_async
(
pipeline
.
id
)
if
pipeline
.
default_branch?
...
...
@@ -134,7 +134,7 @@ module EE
def
license_scanning_report
::
Gitlab
::
Ci
::
Reports
::
LicenseScanning
::
Report
.
new
.
tap
do
|
license_management_report
|
builds
.
latest
.
with_reports
(
::
Ci
::
JobArtifact
.
license_
management
_reports
).
each
do
|
build
|
builds
.
latest
.
with_reports
(
::
Ci
::
JobArtifact
.
license_
scanning
_reports
).
each
do
|
build
|
build
.
collect_license_scanning_reports!
(
license_management_report
)
end
end
...
...
@@ -145,7 +145,7 @@ module EE
builds
.
latest
.
with_reports
(
::
Ci
::
JobArtifact
.
dependency_list_reports
).
each
do
|
build
|
build
.
collect_dependency_list_reports!
(
dependency_list_report
)
end
builds
.
latest
.
with_reports
(
::
Ci
::
JobArtifact
.
license_
management
_reports
).
each
do
|
build
|
builds
.
latest
.
with_reports
(
::
Ci
::
JobArtifact
.
license_
scanning
_reports
).
each
do
|
build
|
build
.
collect_licenses_for_dependency_list!
(
dependency_list_report
)
end
end
...
...
ee/app/models/ee/merge_request.rb
View file @
8715e59a
...
...
@@ -155,7 +155,7 @@ module EE
end
def
has_license_management_reports?
!!
(
actual_head_pipeline
&
.
has_reports?
(
::
Ci
::
JobArtifact
.
license_
management
_reports
))
!!
(
actual_head_pipeline
&
.
has_reports?
(
::
Ci
::
JobArtifact
.
license_
scanning
_reports
))
end
def
has_container_scanning_reports?
...
...
ee/app/models/sca/license_compliance.rb
View file @
8715e59a
...
...
@@ -52,7 +52,7 @@ module SCA
def
pipeline
strong_memoize
(
:pipeline
)
do
project
.
latest_pipeline_with_reports
(
::
Ci
::
JobArtifact
.
license_
management
_reports
)
project
.
latest_pipeline_with_reports
(
::
Ci
::
JobArtifact
.
license_
scanning
_reports
)
end
end
...
...
ee/spec/models/ee/ci/job_artifact_spec.rb
View file @
8715e59a
...
...
@@ -3,8 +3,8 @@
require
'spec_helper'
describe
EE
::
Ci
::
JobArtifact
do
describe
'.license_
management
_reports'
do
subject
{
Ci
::
JobArtifact
.
license_
management
_reports
}
describe
'.license_
scanning
_reports'
do
subject
{
Ci
::
JobArtifact
.
license_
scanning
_reports
}
context
'when there is a license management report'
do
let!
(
:artifact
)
{
create
(
:ee_ci_job_artifact
,
:license_management
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment