added docker file

This commit is contained in:
prasannakumar 2024-06-21 08:33:21 +05:30
parent 25602df753
commit e660614717

14
Jenkinsfile vendored
View file

@ -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} ."
} }
} }
}
}
}
}