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
d51c4bb3
Commit
d51c4bb3
authored
Sep 29, 2020
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '208723-check-feature-once' into 'master'
Remove feature flag See merge request gitlab-org/gitlab!43200
parents
07205891
adaa4bd3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
29 deletions
+7
-29
ee/app/models/ee/ci/build.rb
ee/app/models/ee/ci/build.rb
+0
-2
ee/config/feature_flags/development/parse_license_management_reports.yml
...re_flags/development/parse_license_management_reports.yml
+0
-7
ee/spec/factories/ci/reports/license_scanning/report.rb
ee/spec/factories/ci/reports/license_scanning/report.rb
+1
-1
ee/spec/models/ci/build_spec.rb
ee/spec/models/ci/build_spec.rb
+6
-19
No files found.
ee/app/models/ee/ci/build.rb
View file @
d51c4bb3
...
@@ -79,8 +79,6 @@ module EE
...
@@ -79,8 +79,6 @@ module EE
return
license_scanning_report
unless
project
.
feature_available?
(
:license_scanning
)
return
license_scanning_report
unless
project
.
feature_available?
(
:license_scanning
)
each_report
(
::
Ci
::
JobArtifact
::
LICENSE_SCANNING_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
)
::
Gitlab
::
Ci
::
Parsers
.
fabricate!
(
file_type
).
parse!
(
blob
,
license_scanning_report
)
::
Gitlab
::
Ci
::
Parsers
.
fabricate!
(
file_type
).
parse!
(
blob
,
license_scanning_report
)
end
end
...
...
ee/config/feature_flags/development/parse_license_management_reports.yml
deleted
100644 → 0
View file @
07205891
---
name
:
parse_license_management_reports
introduced_by_url
:
rollout_issue_url
:
group
:
type
:
development
default_enabled
:
true
ee/spec/factories/ci/reports/license_scanning/report.rb
View file @
d51c4bb3
# frozen_string_literal: true
# frozen_string_literal: true
FactoryBot
.
define
do
FactoryBot
.
define
do
factory
:ci_reports_license_scanning_report
,
class:
'::Gitlab::Ci::Reports::LicenseScanning::Report'
,
aliases:
[
:license_scan_report
]
do
factory
:ci_reports_license_scanning_report
,
class:
'::Gitlab::Ci::Reports::LicenseScanning::Report'
,
aliases:
[
:license_scan_report
,
:license_scanning_report
]
do
trait
:version_1
do
trait
:version_1
do
version
{
'1.0'
}
version
{
'1.0'
}
end
end
...
...
ee/spec/models/ci/build_spec.rb
View file @
d51c4bb3
...
@@ -227,15 +227,15 @@ RSpec.describe Ci::Build do
...
@@ -227,15 +227,15 @@ RSpec.describe Ci::Build do
describe
'#collect_license_scanning_reports!'
do
describe
'#collect_license_scanning_reports!'
do
subject
{
job
.
collect_license_scanning_reports!
(
license_scanning_report
)
}
subject
{
job
.
collect_license_scanning_reports!
(
license_scanning_report
)
}
let
(
:license_scanning_report
)
{
Gitlab
::
Ci
::
Reports
::
LicenseScanning
::
Report
.
new
}
let
(
:license_scanning_report
)
{
build
(
:license_scanning_report
)
}
before
do
stub_licensed_features
(
license_scanning:
true
)
end
it
{
expect
(
license_scanning_report
.
licenses
.
count
).
to
eq
(
0
)
}
it
{
expect
(
license_scanning_report
.
licenses
.
count
).
to
eq
(
0
)
}
context
'when build has a license scanning report'
do
context
'when the build has a license scanning report'
do
before
do
stub_licensed_features
(
license_scanning:
true
)
end
context
'when there is a new type report'
do
context
'when there is a new type report'
do
before
do
before
do
create
(
:ee_ci_job_artifact
,
:license_scanning
,
job:
job
,
project:
job
.
project
)
create
(
:ee_ci_job_artifact
,
:license_scanning
,
job:
job
,
project:
job
.
project
)
...
@@ -275,19 +275,6 @@ RSpec.describe Ci::Build do
...
@@ -275,19 +275,6 @@ RSpec.describe Ci::Build do
end
end
end
end
context
'when Feature flag is disabled for License Scanning reports parsing'
do
before
do
stub_feature_flags
(
parse_license_management_reports:
false
)
create
(
:ee_ci_job_artifact
,
:license_scanning
,
job:
job
,
project:
job
.
project
)
end
it
'does NOT parse license scanning report'
do
subject
expect
(
license_scanning_report
.
licenses
.
count
).
to
eq
(
0
)
end
end
context
'when the license scanning feature is disabled'
do
context
'when the license scanning feature is disabled'
do
before
do
before
do
stub_licensed_features
(
license_scanning:
false
)
stub_licensed_features
(
license_scanning:
false
)
...
...
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