1. in advanced setting of the step, add a repeat parameter, say "retry", with value set to "1, 2, 3" (means to retry for three times)
2. change build condition of the checkout step to execute below script:
groovy:
def prevExecuted = step.previousExecutedSibling;
if (prevExecuted != null) {
if (prevExecuted.failed) {
// previous try failed, let's sleep awhile before retrying
sleep(30000);
return true;
} else { // we've executed the checkout successfully, so no longer need to repeat the execution
return false;
}
} else {
// this is first execution of our checkout step, let's run it
return true;
}