mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 23:05:49 +00:00
added docker file
This commit is contained in:
parent
25602df753
commit
e660614717
1 changed files with 15 additions and 1 deletions
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
|
@ -8,6 +8,7 @@ pipeline {
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
SONAR_AUTH_TOKEN = credentials('SONAR_AUTH_TOKEN') // Assumes you have stored your token in Jenkins Credentials
|
SONAR_AUTH_TOKEN = credentials('SONAR_AUTH_TOKEN') // Assumes you have stored your token in Jenkins Credentials
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
@ -56,5 +57,18 @@ pipeline {
|
||||||
sh 'mvn clean package -DskipTests'
|
sh 'mvn clean package -DskipTests'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Build & push Docker Image') {
|
||||||
|
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
withDockerRegistry('Docker') {
|
||||||
|
sh "docker build -t prasannakumarsinganamalla431/petclinic:${BUILD_NUMBER} ."
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue