Skip to content

Commit 23a14e7

Browse files
authored
ci: docker login (#122)
this will help with pushing the docker images
1 parent 6e99924 commit 23a14e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.ci/Jenkinsfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pipeline {
1212
PIPELINE_LOG_LEVEL = 'INFO'
1313
GITHUB_TOKEN_CREDENTIALS = "2a9602aa-ab9f-4e52-baf3-b71ca88469c7"
1414
SLACK_CHANNEL = '#elastic-agent-control-plane'
15+
DOCKER_ELASTIC_SECRET = 'secret/observability-team/ci/docker-registry/prod'
16+
DOCKER_REGISTRY = 'docker.elastic.co'
1517
}
1618
options {
1719
timeout(time: 1, unit: 'HOURS')
@@ -76,8 +78,9 @@ pipeline {
7678
deleteDir()
7779
unstash 'source'
7880
dir("${BASE_DIR}"){
81+
dockerLogin(secret: "${DOCKER_ELASTIC_SECRET}", registry: "${DOCKER_REGISTRY}")
7982
withGoEnv() {
80-
sh 'go install github.com/goreleaser/[email protected]'
83+
sh(label: 'install goreleaser', script: 'go install github.com/goreleaser/[email protected]')
8184
withCredentials([string(credentialsId: "${env.GITHUB_TOKEN_CREDENTIALS}", variable: 'GITHUB_TOKEN')]) {
8285
// Ensure that tags are present so goreleaser can build the changelog from the last release.
8386
gitCmd(cmd: 'fetch', args: '--unshallow --tags')

0 commit comments

Comments
 (0)