added docker stage

This commit is contained in:
prasannakumar 2024-06-21 09:42:07 +05:30
parent 47798adc58
commit 43b55f1f92

4
Jenkinsfile vendored
View file

@ -26,7 +26,7 @@ pipeline {
// Run Maven with SonarQube plugin for analysis
withSonarQubeEnv('SonarQubeScanner') {
sh """
mvn sonar:sonar -Dsonar.login=${SONAR_AUTH_TOKEN} \
mvn sonar:sonar -Dsonar.login="${SONAR_AUTH_TOKEN}" \
-Dsonar.projectName=spring-petclinic \
-Dsonar.java.binaries=. \
-Dsonar.projectKey=spring-petclinic
@ -66,7 +66,7 @@ pipeline {
steps {
script {
withDockerRegistry(credentialsId: 'DOCKER_REGISTRY_CREDENTIALS',registryUrl: "https://hub.docker.com/") {
withDockerRegistry(credentialsId:"${DOCKER_REGISTRY_CREDENTIALS}" ,registryUrl: "https://hub.docker.com/") {
sh "docker build -t prasannakumarsinganamalla431/petclinic:${BUILD_NUMBER} ."