Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 59ec475

Browse files
committed
Jenkinsfile: use --password-stdin
before: docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD WARNING! Using --password via the CLI is insecure. Use --password-stdin. Login Succeeded with this PR: echo $REGISTRY_PASSWORD | docker login -u "$REGISTRY_USERNAME" --password-stdin Login Succeeded Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 24b127c commit 59ec475

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Jenkinsfile.baguette

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pipeline {
6868
dir('src/github.com/docker/app') {
6969
checkout scm
7070
ansiColor('xterm') {
71-
sh "docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD"
71+
sh 'echo "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USERNAME}" --password-stdin'
7272
sh "FOSSA_API_KEY=$FOSSA_API_KEY BRANCH_NAME='${BRANCH_NAME}' make fossa-analyze"
7373
sh "FOSSA_API_KEY=$FOSSA_API_KEY make fossa-test"
7474
}
@@ -284,7 +284,7 @@ pipeline {
284284
}
285285
steps{
286286
echo "Pushing Base Invocation Image"
287-
sh 'docker login --username "${DOCKERHUB_CREDS_USR}" --password "${DOCKERHUB_CREDS_PSW}"'
287+
sh 'echo "${DOCKERHUB_CREDS_PSW}" | docker login --username "${DOCKERHUB_CREDS_USR}" --password-stdin'
288288
dir('src/github.com/docker/app') {
289289
checkout scm
290290
dir('_build') {

0 commit comments

Comments
 (0)