Skip to content

Commit

Permalink
[7.x] Retry git clone up to 8 times before failing a build (#5… (elas…
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Nov 15, 2019
1 parent 7e96126 commit 921fa56
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion vars/kibanaPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,17 @@ def jobRunner(label, useRamDisk, closure) {
}
}

def scmVars = checkout scm
def scmVars

// Try to clone from Github up to 8 times, waiting 15 secs between attempts
retry(8) {
try {
scmVars = checkout scm
} catch (ex) {
sleep 15
throw ex
}
}

withEnv([
"CI=true",
Expand Down

0 comments on commit 921fa56

Please sign in to comment.