mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 06:45:50 +00:00
Edit Jenkinsfile
This commit is contained in:
parent
15f8ce5a6a
commit
7aa76a8211
1 changed files with 0 additions and 14 deletions
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
|
@ -35,19 +35,5 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ('Create Docker Image for Main Branch') {
|
|
||||||
when {
|
|
||||||
branch 'main'
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'docker build -t vkarpenko02/main:${GIT_COMMIT} .'
|
|
||||||
withCredentials([usernamePassword(credentialsId: 'docker_key', usernameVariable: 'DOCKER_HUB_USER', passwordVariable: 'DOCKER_HUB_PASS')]) {
|
|
||||||
sh """
|
|
||||||
echo ${DOCKER_HUB_PASS} | docker login -u ${DOCKER_HUB_USER} --password-stdin
|
|
||||||
docker push vkarpenko02/main:${GIT_COMMIT}
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue