summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-07-20 11:25:54 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2017-07-20 11:25:54 +0000
commit4766a77b1d44bb6989e6c86a7a7dd10f6983ba4e (patch)
tree4be7678217b685f6fabea749338d7dedc2719a11 /doc
parent001dd56e7bfd04d22f5437569ba8aa60a0317a3e (diff)
parent2f620aa7116f504229be81c2465fead342a57292 (diff)
downloadgitlab-ce-4766a77b1d44bb6989e6c86a7a7dd10f6983ba4e.tar.gz
Merge branch 'feature/gb/auto-retry-failed-ci-job' into 'master'
Make it possible to auto retry a failed CI/CD job Closes #3442 See merge request !12909
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/yaml/README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 724843a4d56..e12ef6e2685 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -395,6 +395,7 @@ job_name:
| 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 |
### script
@@ -1129,9 +1130,33 @@ A simple example:
```yaml
job1:
+ script: rspec
coverage: '/Code coverage: \d+\.\d+/'
```
+### retry
+
+**Notes:**
+- [Introduced][ce-3442] in GitLab 9.5.
+
+`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
+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:
+
+```yaml
+test:
+ script: rspec
+ retry: 2
+```
+
## Git Strategy
> Introduced in GitLab 8.9 as an experimental feature. May change or be removed
@@ -1506,3 +1531,4 @@ CI with various languages.
[variables]: ../variables/README.md
[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-3442]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3442