From 7195cfb822197032fdea9b491462fae43e87e9b8 Mon Sep 17 00:00:00 2001 From: Brian Seeders Date: Fri, 15 May 2020 10:40:30 -0400 Subject: [PATCH] [CI] Add one retry to setup step (#66638) --- vars/kibanaPipeline.groovy | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/vars/kibanaPipeline.groovy b/vars/kibanaPipeline.groovy index d69ef8a97bb58..130e72a5bdea9 100644 --- a/vars/kibanaPipeline.groovy +++ b/vars/kibanaPipeline.groovy @@ -161,7 +161,18 @@ def bash(script, label) { } def doSetup() { - runbld("./test/scripts/jenkins_setup.sh", "Setup Build Environment and Dependencies") + retryWithDelay(2, 15) { + try { + runbld("./test/scripts/jenkins_setup.sh", "Setup Build Environment and Dependencies") + } catch (ex) { + try { + // Setup expects this directory to be missing, so we need to remove it before we do a retry + bash("rm -rf ../elasticsearch", "Remove elasticsearch sibling directory, if it exists") + } finally { + throw ex + } + } + } } def buildOss() {