diff --git a/Jenkinsfile b/Jenkinsfile index 7626f35..16d1c9a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,7 +23,8 @@ pipeline { stage('Deploy Image') { steps{ script { - withDockerRegistry(url: 'https://docker.io', credentialsId: 'dockerhub_jcabillot') { + withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS']) { + sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}' sh 'cat /var/jenkins_home/workspace/perso_jenkins-wdocker_master@tmp/abed23b6-7300-4b49-82d2-0f788b5079a0/config.json' sh 'docker push jcabillot/jenkins-wdocker' }