From c072a247191beb4a4ed62a2e65f760e6f58cc087 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Tue, 14 Apr 2020 09:55:13 +0200 Subject: [PATCH] fix: login into the docker registry (#17620) * fix: login into the docker registry * test: make a pull after login to test * docs: add note to the workaround --- Jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4846758991b..f76cb7d3ea6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,6 +8,8 @@ pipeline { BASE_DIR = 'src/github.com/elastic/beats' GOX_FLAGS = "-arch amd64" DOCKER_COMPOSE_VERSION = "1.21.0" + DOCKERELASTIC_SECRET = 'secret/observability-team/ci/docker-registry/prod' + DOCKER_REGISTRY = 'docker.elastic.co' } options { timeout(time: 2, unit: 'HOURS') @@ -657,6 +659,9 @@ 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' 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")