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
Léo-Paul Géneau
gitlab-ce
Commits
23223ba6
Commit
23223ba6
authored
Jul 19, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not allow to auto-retry a job more than 2 times
parent
f49a906a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+1
-1
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
+1
-1
No files found.
doc/ci/yaml/README.md
View file @
23223ba6
...
...
@@ -1147,7 +1147,7 @@ up to the amount of times specified by the `retry` keyword.
If
`retry`
is set to 3, and a job succeeds in a second run, it won't be retried
again.
`retry`
value has to be a positive integer, equal or larger than 0, but
lower
than 10
.
lower
or equal to 2 (two retries maximum, three runs in total)
.
A simple example:
...
...
lib/gitlab/ci/config/entry/job.rb
View file @
23223ba6
...
...
@@ -25,7 +25,7 @@ module Gitlab
validates
:allow_failure
,
boolean:
true
validates
:retry
,
numericality:
{
only_integer:
true
,
greater_than_or_equal_to:
0
,
less_than
:
10
}
less_than
_or_equal_to:
2
}
validates
:when
,
inclusion:
{
in:
%w[on_success on_failure always manual]
,
message:
'should be on_success, on_failure, '
\
...
...
spec/lib/gitlab/ci/config/entry/job_spec.rb
View file @
23223ba6
...
...
@@ -115,7 +115,7 @@ describe Gitlab::Ci::Config::Entry::Job do
it
'returns error about value too high'
do
expect
(
entry
).
not_to
be_valid
expect
(
entry
.
errors
).
to
include
'job retry must be less than
10
'
expect
(
entry
.
errors
).
to
include
'job retry must be less than
or equal to 2
'
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