mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 07:45:49 +00:00
working
This commit is contained in:
parent
6569847067
commit
151807900b
1 changed files with 15 additions and 12 deletions
27
Jenkinsfile1 → Jenkinsfile
vendored
27
Jenkinsfile1 → Jenkinsfile
vendored
|
@ -2,9 +2,9 @@
|
|||
|
||||
pipeline {
|
||||
environment {
|
||||
registry = "owlleg68/petclinic"
|
||||
registry = "owlleg68/spring-petclinic"
|
||||
registryCredential = 'dockerhub_id'
|
||||
dockerImage = 'spring-petclinic:2.4.2'
|
||||
dockerImage = ''
|
||||
}
|
||||
|
||||
agent {
|
||||
|
@ -34,24 +34,27 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Build Docker image with Spring') {
|
||||
stage('Build Docker image') {
|
||||
steps {
|
||||
//script{
|
||||
// dockerImage = docker.build registry
|
||||
//}
|
||||
sh 'mvn spring-boot:build-image'
|
||||
script{
|
||||
dockerImage = docker.build registry
|
||||
}
|
||||
//sh 'mvn spring-boot:build-image'
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
stage('Push Image') {
|
||||
script {
|
||||
docker.withRegistry( 'spring-petclinic:2.4.2', registryCredential ) {
|
||||
dockerImage.push()
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry( '', registryCredential ) {
|
||||
dockerImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
stage('Artifacts') {
|
||||
steps {
|
Loading…
Reference in a new issue