mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:25:49 +00:00
Update Jenkinsfile
Signed-off-by: prankumargrid <prankumar@griddynamics.com>
This commit is contained in:
parent
9344fdd0f8
commit
5aeb5e731c
1 changed files with 1 additions and 1 deletions
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
|
@ -52,7 +52,7 @@ pipeline {
|
|||
script {
|
||||
def tag = BRANCH_NAME == 'main' ? 'latest' : "${COMMIT}"
|
||||
def repo = BRANCH_NAME == 'main' ? "${DOCKER_IMAGE}-main" : "${DOCKER_IMAGE}-mr"
|
||||
sh "docker build -t ${repo}:${tag} ."
|
||||
sh "docker buildx build -t ${repo}:${tag} ."
|
||||
withCredentials([usernamePassword(credentialsId: 'dockerhub', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
|
||||
sh "echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin"
|
||||
sh "docker push ${repo}:${tag}"
|
||||
|
|
Loading…
Reference in a new issue