diff --git a/Jenkinsfile b/Jenkinsfile index c8ec998..a823156 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { environment { DOCKERHUB_USER = 'vipin2025devops' IMAGE_NAME = 'myapp' - IMAGE_TAG = "latest" + IMAGE_TAG = 'latest' K8S_DEPLOYMENT = 'k8s/deployment.yaml' K8S_SERVICE = 'k8s/service.yaml' } @@ -26,7 +26,10 @@ pipeline { stage('Push Image to Docker Hub') { steps { - withCredentials([usernamePassword(credentialsId: 'docker-hub-credentials', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) { + withCredentials([usernamePassword( + credentialsId: 'dockerhub-creds', + usernameVariable: 'DOCKER_USER', + passwordVariable: 'DOCKER_PASS')]) { powershell """ echo $env:DOCKER_PASS | docker login -u $env:DOCKER_USER --password-stdin docker push ${DOCKERHUB_USER}/${IMAGE_NAME}:${IMAGE_TAG}