From a9d765a61218d856154423dcbcf9763b508fa0b2 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Wed, 8 Apr 2020 19:05:45 +0200 Subject: [PATCH 1/3] fix: login into the docker registry --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4846758991b7..0cfc65fab016 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,7 @@ def withBeatsEnv(boolean archive, Closure body) { ]) { deleteDir() unstash 'source' + dockerLogin(secret: "${DOCKERELASTIC_SECRET}", registry: "${DOCKER_REGISTRY}") 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") From a004f54a0b8cca343576cabfa4a390d0027cbe8a Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Mon, 13 Apr 2020 12:10:32 +0200 Subject: [PATCH 2/3] test: make a pull after login to test --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 0cfc65fab016..bd549ba8ce47 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -660,6 +660,7 @@ def withBeatsEnv(boolean archive, Closure body) { deleteDir() unstash 'source' dockerLogin(secret: "${DOCKERELASTIC_SECRET}", registry: "${DOCKER_REGISTRY}") + 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") From 5e92736034015b1225984762d40fe39cf19cb911 Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Mon, 13 Apr 2020 13:55:42 +0200 Subject: [PATCH 3/3] docs: add note to the workaround --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index bd549ba8ce47..f76cb7d3ea60 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -660,6 +660,7 @@ 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")