From 208c0697338d495922d6f09ce0c693cfc04a4998 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 d480d2ee3966..d7adadeae066 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') @@ -644,6 +646,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")