added docker stage

This commit is contained in:
prasannakumar 2024-06-25 09:52:52 +05:30
parent ad85e4f212
commit c63c93d26a

11
Jenkinsfile vendored
View file

@ -75,6 +75,17 @@ pipeline {
withDockerRegistry(credentialsId: 'Docker_cred', toolName: 'Docker') {
sh "docker build -t prasannakumarsinganamalla431/petclinic:${BUILD_NUMBER} ."
}
}
}
}
stage('pushing image to Docker hub') {
steps {
script {
withDockerRegistry(credentialsId: 'Docker_cred', toolName: 'Docker') {
sh "docker push prasannakumarsinganamalla431/petclinic:${BUILD_NUMBER}"
}
}