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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
126fbe58
Commit
126fbe58
authored
Nov 07, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return untouched hash if no job is parallelized
parent
e7df959b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
lib/gitlab/ci/config/normalizer.rb
lib/gitlab/ci/config/normalizer.rb
+4
-2
spec/lib/gitlab/ci/config/normalizer_spec.rb
spec/lib/gitlab/ci/config/normalizer_spec.rb
+8
-0
No files found.
lib/gitlab/ci/config/normalizer.rb
View file @
126fbe58
...
...
@@ -9,14 +9,16 @@ module Gitlab
end
def
normalize_jobs
extract_parallelized_jobs
extract_parallelized_jobs!
return
@jobs_config
if
@parallelized_jobs
.
empty?
parallelized_config
=
parallelize_jobs
parallelize_dependencies
(
parallelized_config
)
end
private
def
extract_parallelized_jobs
def
extract_parallelized_jobs
!
@parallelized_jobs
=
{}
@jobs_config
.
each
do
|
job_name
,
config
|
...
...
spec/lib/gitlab/ci/config/normalizer_spec.rb
View file @
126fbe58
...
...
@@ -31,6 +31,14 @@ describe Gitlab::Ci::Config::Normalizer do
expect
(
configs
).
to
all
(
eq
(
original_config
))
end
context
'when the job is not parallelized'
do
let
(
:job_config
)
{
{
script:
'rspec'
,
name:
'rspec'
}
}
it
'returns the same hash'
do
is_expected
.
to
eq
(
config
)
end
end
context
'when there is a job with a slash in it'
do
let
(
:job_name
)
{
:"rspec 35/2"
}
...
...
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