Automatic Retry

Automatic Retry is a build utility that will automatically restart or re-run failed/incompleted jobs. Bamboo administrators can use Automatic Retry for plans that have a dependency on the availability of 3rd party services (like FTP/SSH). If the service is temporary unavailable and the build fails because of it, the Automatic Retry add-on will reschedule the job without supervision. If the service becomes available again, the job will finish successfully. Automatic Retry can also help with other environment specific issues like remote agents that go offline, memory or CPU performance issues or network outages.

System administrators can create retry configurations which determine how often an automatic retry will be scheduled, the timeout between each retry and if a re-run of the entire plan is performed when a job continuous to fail.

Creating a retry configuration

This example assumes you already have Bamboo setup with the Utility Belt for Bamboo app and have created a Plan.

You can create a retry configuration in two simple steps:

  1. Go to the Auto Retry configuration screen in the Bamboo Administration interface

  2. Add a Retry Configuration using a descriptive name, the preferred number of retries, the timeout in seconds between retries and the plan to which the retry configuration should apply.

The retry configuration will be evaluated each time a job fails. If the plan is part of the retry configuration the job execution will be rescheduled.

Testing the retry configuration

In order to test the Automatic Retry you can create a Job in a plan which is part of a retry configuration with a Script Task which has the following inline script body (Bash example):

echo "This task will fail" sleep 10s exit -1

Run the plan and watch it fail. On the build result summary page an Automatic Retry status panel should appear which will show the number of retries left and the date / time the next retry is scheduled.

Automatic Retry will not reschedule jobs that were manually stopped.