diff --git a/Jenkinsfile b/Jenkinsfile index 41e6fb2bd..3adfcbcec 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,6 +8,7 @@ pipeline { environment { SONAR_AUTH_TOKEN = credentials('SONAR_AUTH_TOKEN') // Assumes you have stored your token in Jenkins Credentials + } stages { @@ -56,5 +57,18 @@ pipeline { sh 'mvn clean package -DskipTests' } } - } + stage('Build & push Docker Image') { + + steps { + script { + withDockerRegistry('Docker') { + sh "docker build -t prasannakumarsinganamalla431/petclinic:${BUILD_NUMBER} ." + + + } + } + } + } + } + }