From 332b850f788833c1489e3f58a7f6322a7c0775e5 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Fri, 17 Apr 2020 09:29:30 +0200 Subject: [PATCH] fix: disable workaround on macos (#17750) * fix: disable workaround on macos * Update Jenkinsfile Co-Authored-By: Victor Martinez * Update Jenkinsfile Co-Authored-By: Andrew Kroh Co-authored-by: Victor Martinez Co-authored-by: Andrew Kroh --- Jenkinsfile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1c3633aa375..b1064faaa32 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -660,9 +660,15 @@ def withBeatsEnv(boolean archive, Closure body) { ]) { deleteDir() unstash 'source' - dockerLogin(secret: "${DOCKERELASTIC_SECRET}", registry: "${DOCKER_REGISTRY}") - // FIXME workaround untill we fix the packer cache - sh 'docker pull docker.elastic.co/observability-ci/database-enterprise:12.2.0.1' + if(os == 'linux'){ + dockerLogin(secret: "${DOCKERELASTIC_SECRET}", registry: "${DOCKER_REGISTRY}") + // FIXME workaround until we fix the packer cache + // Retry to avoid DDoS detection from the server + retry(3) { + sleep randomNumber(min: 2, max: 5) + sh 'docker pull docker.elastic.co/observability-ci/database-enterprise:12.2.0.1' + } + } dir("${env.BASE_DIR}") { sh(label: "Install Go ${GO_VERSION}", script: ".ci/scripts/install-go.sh") sh(label: "Install docker-compose ${DOCKER_COMPOSE_VERSION}", script: ".ci/scripts/install-docker-compose.sh")