mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 15:25:49 +00:00
Docker login stage
This commit is contained in:
parent
559581b643
commit
69adb9c27a
1 changed files with 14 additions and 2 deletions
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
|
@ -35,6 +35,18 @@ pipeline {
|
|||
sh 'docker build -t $NEXUS_DOCKER_REPO/spring-petclinic:${GIT_COMMIT} .'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Docker Login') {
|
||||
steps {
|
||||
echo 'Nexus Docker Repository Login'
|
||||
script{
|
||||
withCredentials([usernamePassword(credentialsId: 'nexus-cred', usernameVariable: 'USER', passwordVariable: 'PASS' )]){
|
||||
sh ' echo $PASS | docker login -u $USER --password-stdin $NEXUS_DOCKER_REPO'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
|
|
Loading…
Reference in a new issue