Im trying to implement a automatic retry on failed steps in our pipeline but have been getting errors on the way the limit is set. My syntax is below:
mapping values are not allowed in this context on line ( limit: 3)
I have since removed the limit line and my pipelines now only contain the below:
I was expecting this to continue to retry until manually stopped but it seems to only try 3 times which is what i originally wanted. Is there a default limit set somewhere? And how can i set my limit as part of the pipeline if id like some steps to attempt more then 3 times?
Hi @Kelklrkl ,
Welcome to the Buildkite Community!
The default retry limit is 3, so you were lucky on that!
But when you specify the limit on a retry, you would need to specify the exit status:
- label: "Tests"
- exit_status: 5
You can read more about that here.
Thanks for your reply, I tried to add the exit_status but each run may produce a different exit status, so I cant use just one exit_status.
Ive tried leaving it blank such as the below:
But this didnt trigger a retry on pipeline failures.
On which exit code is being checked when the below is run?
With the exception of not being able to specify a limit, the above behaves exactly how id like.
Is equivalent to:
- exit_status: "*"