diff --git a/Jenkinsfile b/Jenkinsfile index 7290d24..cf0c9f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,8 @@ node-prune''' sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:latest' sh 'docker tag $TEMP_IMAGE_NAME docker.io/jc21/$IMAGE_NAME:$TAG_VERSION' - withDockerRegistry([credentialsId: 'jc21-dockerhub', url: '']) { + withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) { + sh "docker login -u '${duser}' -p '$dpass'" sh 'docker push docker.io/jc21/$IMAGE_NAME:latest' sh 'docker push docker.io/jc21/$IMAGE_NAME:$TAG_VERSION' }