From f313cc2bda4315fc0e5b1880ef55744b1d593b6e Mon Sep 17 00:00:00 2001 From: Brian Seeders Date: Fri, 15 Nov 2019 14:47:01 -0500 Subject: [PATCH] =?UTF-8?q?[7.5]=20Retry=20git=20clone=20up=20to=208=20tim?= =?UTF-8?q?es=20before=20failing=20a=20build=20(#5=E2=80=A6=20(#50791)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vars/kibanaPipeline.groovy | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/vars/kibanaPipeline.groovy b/vars/kibanaPipeline.groovy index e8d7cc03edad0..f824acbc63ccd 100644 --- a/vars/kibanaPipeline.groovy +++ b/vars/kibanaPipeline.groovy @@ -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",