From 54e882b6d9bf3eccabbb845b1acbca7fc2d66d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Tue, 11 Jan 2022 17:08:18 +0100 Subject: [PATCH] chore: add resiliency when provisioning the stack (#1990) --- .ci/Jenkinsfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 30965e9a97..14216cc682 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -209,9 +209,13 @@ pipeline { // Must be gathered after deployment as the public IP is known at that time def stackRunner = getNodeIp(stackWorkspace, 'stack') - ansible(stackWorkspace, - env.RUN_ID.split('-')[0], - "-i \"${stackRunner.ip},\" -t setup-stack --extra-vars=\"nodeLabel=stack nodeImage=${stackMachine.image} nodeInstanceType=${stackMachine.instance_type}\"") + retryWithSleep(retries: 2, seconds: 5, backoff: true) { + ansible( + stackWorkspace, + env.RUN_ID.split('-')[0], + "-i \"${stackRunner.ip},\" -t setup-stack --extra-vars=\"nodeLabel=stack nodeImage=${stackMachine.image} nodeInstanceType=${stackMachine.instance_type}\"" + ) + } // Update stash with latest changes from the stack deployment stash allowEmpty: true, name: 'sourceEnvModified', useDefaultExcludes: false