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
ab6e5b9d
Commit
ab6e5b9d
authored
Jan 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
1a20f683
5f258b0c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
changelogs/unreleased/55628-artifacts-from-a-job-defined-after-a-parallel-job-are-not-downloaded.yml
...a-job-defined-after-a-parallel-job-are-not-downloaded.yml
+5
-0
lib/gitlab/ci/config/normalizer.rb
lib/gitlab/ci/config/normalizer.rb
+2
-1
spec/lib/gitlab/ci/config/normalizer_spec.rb
spec/lib/gitlab/ci/config/normalizer_spec.rb
+20
-0
No files found.
changelogs/unreleased/55628-artifacts-from-a-job-defined-after-a-parallel-job-are-not-downloaded.yml
0 → 100644
View file @
ab6e5b9d
---
title
:
Handle regular job dependencies next to parallelized job dependencies.
merge_request
:
24273
author
:
type
:
fixed
lib/gitlab/ci/config/normalizer.rb
View file @
ab6e5b9d
...
...
@@ -46,7 +46,8 @@ module Gitlab
parallelized_job_names
=
@parallelized_jobs
.
keys
.
map
(
&
:to_s
)
parallelized_config
.
each_with_object
({})
do
|
(
job_name
,
config
),
hash
|
if
config
[
:dependencies
]
&&
(
intersection
=
config
[
:dependencies
]
&
parallelized_job_names
).
any?
deps
=
intersection
.
map
{
|
dep
|
@parallelized_jobs
[
dep
.
to_sym
].
map
(
&
:first
)
}.
flatten
parallelized_deps
=
intersection
.
map
{
|
dep
|
@parallelized_jobs
[
dep
.
to_sym
].
map
(
&
:first
)
}.
flatten
deps
=
config
[
:dependencies
]
-
intersection
+
parallelized_deps
hash
[
job_name
]
=
config
.
merge
(
dependencies:
deps
)
else
hash
[
job_name
]
=
config
...
...
spec/lib/gitlab/ci/config/normalizer_spec.rb
View file @
ab6e5b9d
...
...
@@ -62,5 +62,25 @@ describe Gitlab::Ci::Config::Normalizer do
expect
(
subject
[
:other_job
][
:dependencies
]).
not_to
include
(
job_name
)
end
end
context
'when there are dependencies which are both parallelized and not'
do
let
(
:config
)
do
{
job_name
=>
job_config
,
other_job:
{
script:
'echo 1'
},
final_job:
{
script:
'echo 1'
,
dependencies:
[
job_name
.
to_s
,
"other_job"
]
}
}
end
it
'parallelizes dependencies'
do
job_names
=
[
"rspec 1/5"
,
"rspec 2/5"
,
"rspec 3/5"
,
"rspec 4/5"
,
"rspec 5/5"
]
expect
(
subject
[
:final_job
][
:dependencies
]).
to
include
(
*
job_names
)
end
it
'includes the regular job in dependencies'
do
expect
(
subject
[
:final_job
][
:dependencies
]).
to
include
(
'other_job'
)
end
end
end
end
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