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
bb9a14a3
Commit
bb9a14a3
authored
Oct 26, 2021
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass one array of stages to build seed
parent
fcd31f67
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
ee/lib/ee/gitlab/ci/pipeline/seed/build.rb
ee/lib/ee/gitlab/ci/pipeline/seed/build.rb
+1
-1
lib/gitlab/ci/pipeline/seed/build.rb
lib/gitlab/ci/pipeline/seed/build.rb
+2
-2
lib/gitlab/ci/pipeline/seed/stage.rb
lib/gitlab/ci/pipeline/seed/stage.rb
+1
-1
spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
+1
-1
No files found.
ee/lib/ee/gitlab/ci/pipeline/seed/build.rb
View file @
bb9a14a3
...
...
@@ -9,7 +9,7 @@ module EE
extend
::
Gitlab
::
Utils
::
Override
override
:attributes
def
initialize
(
context
,
attributes
,
previous_stages
,
current_stage
=
nil
)
def
initialize
(
context
,
attributes
,
stages_for_needs_lookup
)
super
@dast_configuration
=
attributes
.
dig
(
:options
,
:dast_configuration
)
...
...
lib/gitlab/ci/pipeline/seed/build.rb
View file @
bb9a14a3
...
...
@@ -11,11 +11,11 @@ module Gitlab
delegate
:dig
,
to: :@seed_attributes
def
initialize
(
context
,
attributes
,
previous_stages
,
current_stage
)
def
initialize
(
context
,
attributes
,
stages_for_needs_lookup
=
[]
)
@context
=
context
@pipeline
=
context
.
pipeline
@seed_attributes
=
attributes
@stages_for_needs_lookup
=
(
previous_stages
+
[
current_stage
])
.
compact
@stages_for_needs_lookup
=
stages_for_needs_lookup
.
compact
@needs_attributes
=
dig
(
:needs_attributes
)
@resource_group_key
=
attributes
.
delete
(
:resource_group_key
)
@job_variables
=
@seed_attributes
.
delete
(
:job_variables
)
...
...
lib/gitlab/ci/pipeline/seed/stage.rb
View file @
bb9a14a3
...
...
@@ -17,7 +17,7 @@ module Gitlab
@previous_stages
=
previous_stages
@builds
=
attributes
.
fetch
(
:builds
).
map
do
|
attributes
|
Seed
::
Build
.
new
(
context
,
attributes
,
previous_stages
,
self
)
Seed
::
Build
.
new
(
context
,
attributes
,
previous_stages
+
[
self
]
)
end
end
...
...
spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
View file @
bb9a14a3
...
...
@@ -13,7 +13,7 @@ RSpec.describe Gitlab::Ci::Pipeline::Seed::Build do
let
(
:previous_stages
)
{
[]
}
let
(
:current_stage
)
{
double
(
seeds_names:
[
attributes
[
:name
]])
}
let
(
:seed_build
)
{
described_class
.
new
(
seed_context
,
attributes
,
previous_stages
,
current_stage
)
}
let
(
:seed_build
)
{
described_class
.
new
(
seed_context
,
attributes
,
previous_stages
+
[
current_stage
]
)
}
describe
'#attributes'
do
subject
{
seed_build
.
attributes
}
...
...
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