Skip to content

Commit

Permalink
Retry git clone up to 8 times before failing a build (elastic#50734)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders committed Nov 15, 2019
1 parent f68a072 commit fd1b58e
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 fd1b58e

Please sign in to comment.