diff --git a/Jenkinsfile b/Jenkinsfile index 4bb2290f7..6d32c56ba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,6 +37,15 @@ stage('Login to dockerhub') { } } } +stage('Login to Nexus') { + steps { + withCredentials([usernamePassword(credentialsId: 'nexus-credentials', + usernameVariable: 'NEXUS_USER', + passwordVariable: 'NEXUS_PASS')]) { + sh 'echo $NEXUS_PASS | docker login $registry -u $NEXUS_USER --password-stdin' + } + } + } stage('Push') { steps {