diff --git a/Jenkinsfile b/Jenkinsfile index 1c3633aa375e..b1064faaa321 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")