diff --git a/JenkinsFile b/JenkinsFile index 62f9857..658c3a9 100644 --- a/JenkinsFile +++ b/JenkinsFile @@ -14,10 +14,12 @@ pipeline { } } stage('push') { - steps { + steps { + withCredentials([usernamePassword(credentialsId: 'DockerHub-LG', passwordVariable: 'PSWD', usernameVariable: 'LOGIN')]) { script { - sh 'echo 'Makaron118912' | docker login -u "maciejm.01@interia.pl" --password-stdin' - sh 'docker push ${DOCKER_REPO}:${IMG_NAME}' + sh 'echo ${PSWD} | docker login -u ${LOGIN} --password-stdin' + sh 'docker push ${DOCKER_REPO}:${IMG_NAME}' + } } } }