retry
Automatically retry a failed job.
Supported: number, when conditions, exit codes
Examples
Retry up to N times
job:
script:
- if [ "$CI_JOB_RETRY_COUNT" -eq 0 ]; then exit 1; fi
- echo "retried successfully"
retry: 2
Retry on specific failures
job:
script: echo "job"
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
Retry on specific exit codes
job:
script: echo "job"
retry:
max: 2
exit_codes:
- 137
- 255