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
0322f8f5
Commit
0322f8f5
authored
Nov 04, 2021
by
Ash McKenzie
Committed by
Andy Soiron
Nov 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't add pipeline to Vulnerabilities::Finding
Related:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/73115
parent
e069769f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
ee/db/fixtures/development/20_vulnerabilities.rb
ee/db/fixtures/development/20_vulnerabilities.rb
+1
-4
ee/db/fixtures/development/25_downstream_pipelines.rb
ee/db/fixtures/development/25_downstream_pipelines.rb
+3
-2
No files found.
ee/db/fixtures/development/20_vulnerabilities.rb
View file @
0322f8f5
...
...
@@ -12,14 +12,10 @@ class Gitlab::Seeder::Vulnerabilities
end
def
seed!
return
unless
pipeline
30
.
times
do
|
rank
|
primary_identifier
=
create_identifier
(
rank
)
vulnerability
=
create_vulnerability
occurrence
=
create_occurrence
(
vulnerability
,
rank
,
primary_identifier
)
# Create finding_pipeline join model
occurrence
.
pipelines
<<
pipeline
# Create occurrence_identifier join models
occurrence
.
identifiers
<<
primary_identifier
occurrence
.
identifiers
<<
create_identifier
(
rank
)
if
rank
%
3
==
0
...
...
@@ -70,6 +66,7 @@ class Gitlab::Seeder::Vulnerabilities
scanner
=
FactoryBot
.
create
(
:vulnerabilities_scanner
,
project:
vulnerability
.
project
)
FactoryBot
.
create
(
:vulnerabilities_finding
,
:with_pipeline
,
project:
project
,
vulnerability:
vulnerability
,
scanner:
scanner
,
...
...
ee/db/fixtures/development/25_downstream_pipelines.rb
View file @
0322f8f5
...
...
@@ -2,7 +2,8 @@
# EE fixture
Gitlab
::
Seeder
.
quiet
do
Project
.
not_mass_generated
.
sample
(
5
).
each
do
|
project
|
project
.
ci_pipelines
.
all
.
sample
(
2
).
each
do
|
pipeline
|
project
.
builds
.
sample
(
2
).
each
do
|
build
|
pipeline
=
build
.
pipeline
next
if
pipeline
.
source_pipeline
target_pipeline
=
Ci
::
Pipeline
...
...
@@ -15,7 +16,7 @@ Gitlab::Seeder.quiet do
# link to source pipeline
pipeline
.
sourced_pipelines
.
create!
(
source_job:
pipeline
.
builds
.
all
.
sample
,
source_job:
pipeline
.
builds
.
sample
,
source_project:
pipeline
.
project
,
project:
target_pipeline
.
project
,
pipeline:
target_pipeline
...
...
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