mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-24 00:05:48 +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 {
|
pipeline {
|
||||||
environment {
|
environment {
|
||||||
registry = "owlleg68/petclinic"
|
registry = "owlleg68/spring-petclinic"
|
||||||
registryCredential = 'dockerhub_id'
|
registryCredential = 'dockerhub_id'
|
||||||
dockerImage = 'spring-petclinic:2.4.2'
|
dockerImage = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
agent {
|
agent {
|
||||||
|
@ -34,24 +34,27 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Build Docker image with Spring') {
|
stage('Build Docker image') {
|
||||||
steps {
|
steps {
|
||||||
//script{
|
script{
|
||||||
// dockerImage = docker.build registry
|
dockerImage = docker.build registry
|
||||||
//}
|
}
|
||||||
sh 'mvn spring-boot:build-image'
|
//sh 'mvn spring-boot:build-image'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Push Image') {
|
stage('Push Image') {
|
||||||
script {
|
steps {
|
||||||
docker.withRegistry( 'spring-petclinic:2.4.2', registryCredential ) {
|
script {
|
||||||
dockerImage.push()
|
docker.withRegistry( '', registryCredential ) {
|
||||||
|
dockerImage.push()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
stage('Artifacts') {
|
stage('Artifacts') {
|
||||||
steps {
|
steps {
|
Loading…
Reference in a new issue