Use case
You are trying to check against a service that may be inaccessible for a number of reasons, including:
- Connectivity issues
- Connection limits
- Rate limits
- Unstable service
Solution
In your step, add the retry
feature. An example follows:
steps:
test:
image: ubuntu:latest
commands:
- api-test-here.sh
retry:
maxAttempts: 5
delay: 5
exponentialFactor: 2
Notes
During the retry stages, the build will still use up one of your concurrent builds. For that reason, we suggest limiting the amount of retries.