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
9ba72fe0
Commit
9ba72fe0
authored
Oct 27, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change minimum parallel value to 2
parent
ff179571
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
lib/gitlab/ci/config/entry/job.rb
lib/gitlab/ci/config/entry/job.rb
+1
-1
spec/lib/gitlab/ci/config/entry/job_spec.rb
spec/lib/gitlab/ci/config/entry/job_spec.rb
+3
-3
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+2
-2
No files found.
lib/gitlab/ci/config/entry/job.rb
View file @
9ba72fe0
...
@@ -28,7 +28,7 @@ module Gitlab
...
@@ -28,7 +28,7 @@ module Gitlab
greater_than_or_equal_to:
0
,
greater_than_or_equal_to:
0
,
less_than_or_equal_to:
2
}
less_than_or_equal_to:
2
}
validates
:parallel
,
numericality:
{
only_integer:
true
,
validates
:parallel
,
numericality:
{
only_integer:
true
,
greater_than_or_equal_to:
1
}
greater_than_or_equal_to:
2
}
validates
:when
,
validates
:when
,
inclusion:
{
in:
%w[on_success on_failure always manual delayed]
,
inclusion:
{
in:
%w[on_success on_failure always manual delayed]
,
message:
'should be on_success, on_failure, '
\
message:
'should be on_success, on_failure, '
\
...
...
spec/lib/gitlab/ci/config/entry/job_spec.rb
View file @
9ba72fe0
...
@@ -147,13 +147,13 @@ describe Gitlab::Ci::Config::Entry::Job do
...
@@ -147,13 +147,13 @@ describe Gitlab::Ci::Config::Entry::Job do
end
end
end
end
context
'when it is lower than
one
'
do
context
'when it is lower than
two
'
do
let
(
:config
)
{
{
parallel:
0
}
}
let
(
:config
)
{
{
parallel:
1
}
}
it
'returns error about value too low'
do
it
'returns error about value too low'
do
expect
(
entry
).
not_to
be_valid
expect
(
entry
).
not_to
be_valid
expect
(
entry
.
errors
)
expect
(
entry
.
errors
)
.
to
include
'job parallel must be greater than or equal to
1
'
.
to
include
'job parallel must be greater than or equal to
2
'
end
end
end
end
...
...
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
9ba72fe0
...
@@ -141,11 +141,11 @@ module Gitlab
...
@@ -141,11 +141,11 @@ module Gitlab
context
'when parallel is defined'
do
context
'when parallel is defined'
do
let
(
:config
)
do
let
(
:config
)
do
YAML
.
dump
(
rspec:
{
script:
'rspec'
,
YAML
.
dump
(
rspec:
{
script:
'rspec'
,
parallel:
1
})
parallel:
2
})
end
end
it
'has the attributes'
do
it
'has the attributes'
do
expect
(
subject
[
:options
][
:parallel
]).
to
eq
1
expect
(
subject
[
:options
][
:parallel
]).
to
eq
2
end
end
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