mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
added docker stage
This commit is contained in:
parent
e660614717
commit
8bafe17be3
1 changed files with 4 additions and 2 deletions
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
|
@ -8,6 +8,8 @@ pipeline {
|
|||
|
||||
environment {
|
||||
SONAR_AUTH_TOKEN = credentials('SONAR_AUTH_TOKEN') // Assumes you have stored your token in Jenkins Credentials
|
||||
DOCKER_REGISTRY_CREDENTIALS = credentials('prasannakumarsinganamalla431/****** (dockerhub)')
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -57,11 +59,11 @@ pipeline {
|
|||
sh 'mvn clean package -DskipTests'
|
||||
}
|
||||
}
|
||||
stage('Build & push Docker Image') {
|
||||
stage('Building Docker Image') {
|
||||
|
||||
steps {
|
||||
script {
|
||||
withDockerRegistry('Docker') {
|
||||
withDockerRegistry(credentialsId: 'DOCKER_REGISTRY_CREDENTIALS',registryUrl: "https://hub.docker.com/") {
|
||||
sh "docker build -t prasannakumarsinganamalla431/petclinic:${BUILD_NUMBER} ."
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue