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
95236f53
Commit
95236f53
authored
Sep 20, 2018
by
Markus Doits
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add documentation for new retry when feature
parent
b734e3a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
3 deletions
+46
-3
doc/ci/yaml/README.md
doc/ci/yaml/README.md
+46
-3
No files found.
doc/ci/yaml/README.md
View file @
95236f53
...
...
@@ -74,7 +74,7 @@ A job is defined by a list of parameters that define the job behavior.
| after_script | no | Override a set of commands that are executed after job |
| environment | no | Defines a name of environment to which deployment is done by this job |
| coverage | no | Define code coverage settings for a given job |
| retry | no | Define how many times a job can be auto-retried in case of a failure |
| retry | no | Define
when and
how many times a job can be auto-retried in case of a failure |
| parallel | no | Defines how many instances of a job should be run in parallel |
### `extends`
...
...
@@ -1433,18 +1433,19 @@ job1:
## `retry`
> [Introduced][ce-12909] in GitLab 9.5.
> [Behaviour expanded][ce-21758] in GitLab 11.4 to control on which failures to retry.
`retry`
allows you to configure how many times a job is going to be retried in
case of a failure.
When a job fails
,
and has
`retry`
configured it is going to be processed again
When a job fails and has
`retry`
configured it is going to be processed again
up to the amount of times specified by the
`retry`
keyword.
If
`retry`
is set to 2, and a job succeeds in a second run (first retry), it won't be retried
again.
`retry`
value has to be a positive integer, equal or larger than 0, but
lower or equal to 2 (two retries maximum, three runs in total).
A simple example:
A simple example
to retry in all failure cases
:
```
yaml
test
:
...
...
@@ -1452,6 +1453,47 @@ test:
retry
:
2
```
By default a job will be retried on all failure cases. To have a better control
on which failures to retry,
`retry`
can be a hash with
`when`
and
`max`
keys.
`max`
specifies how many times to retry,
`when`
the failure cases to retry.
To retry only runner system failures at maximum two times:
```
yaml
test
:
script
:
rspec
retry
:
max
:
2
when
:
runner_system_failure
```
If there is another failure than a runner system failure, the job will not be
retried.
To retry on multiple failure cases
`when`
can also be an array of failures:
```
yaml
test
:
script
:
rspec
retry
:
max
:
2
when
:
-
runner_system_failure
-
stuck_or_timeout_failure
```
Possible values for
`when`
are:
-
`always`
: retry on any failure (default)
-
`unknown_failure`
: retry when the failure reason is unknown
-
`script_failure`
: retry when the script failed
-
`api_failure`
: retry on api failure
-
`stuck_or_timeout_failure`
: retry when the job got stuck or timed out
-
`runner_system_failure`
: retry if there was a runner system failure (e.g. setting up the job failed)
-
`missing_dependency_failure`
: retry if a dependency was missing
-
`runner_unsupported`
: retry if the runner was unsupported
## `parallel`
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22631) in GitLab 11.5.
...
...
@@ -2052,6 +2094,7 @@ CI with various languages.
[
ce-7983
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7983
[
ce-7447
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7447
[
ce-12909
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12909
[
ce-21758
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21758
[
schedules
]:
../../user/project/pipelines/schedules.md
[
variables-expressions
]:
../variables/README.md#variables-expressions
[
ee
]:
https://about.gitlab.com/gitlab-ee/
...
...
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