mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:25:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
584389458d
commit
beeadbf396
1 changed files with 4 additions and 0 deletions
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
|
@ -54,6 +54,8 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'which docker || echo "Docker not found in PATH"'
|
||||
sh 'echo "PATH=$PATH"'
|
||||
sh 'echo $DOCKER_HUB_CREDENTIALS_PSW | docker login -u $DOCKER_HUB_CREDENTIALS_USR --password-stdin'
|
||||
def imageName = "${DOCKER_HUB_USERNAME}/mr:${GIT_COMMIT_SHORT}"
|
||||
sh "docker build -t ${imageName} -f Dockerfile ."
|
||||
|
@ -89,6 +91,8 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'which docker || echo "Docker not found in PATH"'
|
||||
sh 'echo "PATH=$PATH"'
|
||||
sh 'echo $DOCKER_HUB_CREDENTIALS_PSW | docker login -u $DOCKER_HUB_CREDENTIALS_USR --password-stdin'
|
||||
|
||||
def imageNameWithCommit = "${DOCKER_HUB_USERNAME}/main:${GIT_COMMIT_SHORT}"
|
||||
|
|
Loading…
Reference in a new issue