From 15975d8582d96d620957a6f7bac14544a6365f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Cl=C3=A9ment?= Date: Thu, 1 Mar 2018 19:58:45 +0100 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4278272..502b13b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,8 @@ node { * First, the incremental build number from Jenkins * Second, the 'latest' tag. * Pushing multiple tags is cheap, as all the layers are reused. */ - docker.withRegistry('https://docker.io', 'docker-hub-credentials') { + withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'docker-hub-credentials', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) { + sh 'docker login -u $USERNAME -p $PASSWORD script { if (env.BRANCH_NAME == 'master') { app.push()