mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
Update Jenkinsfile
This commit is contained in:
parent
748476a81c
commit
1a88e2b842
1 changed files with 7 additions and 2 deletions
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
|
@ -13,10 +13,16 @@ pipeline {
|
||||||
sh 'mvn clean install -Dmaven.test.skip=true'
|
sh 'mvn clean install -Dmaven.test.skip=true'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Run tests') {
|
||||||
|
agent any
|
||||||
|
steps {
|
||||||
|
sh 'mvn clean install -Dmaven.test.skip=true'
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Docker Build') {
|
stage('Docker Build') {
|
||||||
agent any
|
agent any
|
||||||
steps {
|
steps {
|
||||||
sh 'docker build -t spring-petclinic:latest .'
|
sh 'docker build -t sanjeev435/spring-petclinic:latest .'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Docker Push') {
|
stage('Docker Push') {
|
||||||
|
@ -25,7 +31,6 @@ pipeline {
|
||||||
withCredentials([usernamePassword(credentialsId: 'DOCKER_HUB_GLOBAL', passwordVariable: 'dockerHubPassword',
|
withCredentials([usernamePassword(credentialsId: 'DOCKER_HUB_GLOBAL', passwordVariable: 'dockerHubPassword',
|
||||||
usernameVariable: 'dockerHubUser')]) {
|
usernameVariable: 'dockerHubUser')]) {
|
||||||
sh "docker login -u ${env.dockerHubUser} -p ${env.dockerHubPassword}"
|
sh "docker login -u ${env.dockerHubUser} -p ${env.dockerHubPassword}"
|
||||||
sh 'docker tag spring-petclinic sanjeev435/spring-petclinic'
|
|
||||||
sh 'docker push sanjeev435/spring-petclinic'
|
sh 'docker push sanjeev435/spring-petclinic'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue