mirror of
https://github.com/elastic/kibana.git
synced 2025-04-21 16:29:04 -04:00
18 lines
419 B
Groovy
18 lines
419 B
Groovy
def call(retryTimes, delaySecs, closure) {
|
|
retry(retryTimes) {
|
|
try {
|
|
closure()
|
|
} catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException ex) {
|
|
throw ex // Immediately re-throw build abort exceptions, don't sleep first
|
|
} catch (Exception ex) {
|
|
sleep delaySecs
|
|
throw ex
|
|
}
|
|
}
|
|
}
|
|
|
|
def call(retryTimes, Closure closure) {
|
|
call(retryTimes, 15, closure)
|
|
}
|
|
|
|
return this
|