mirror of
https://github.com/chillout2k/sos-milter.git
synced 2025-12-11 01:30:19 +00:00
Jenkinsfile withCredentials
This commit is contained in:
parent
cf5004fcc6
commit
d8ade32da4
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@ -35,6 +35,9 @@ pipeline {
|
||||
stage('Push image') {
|
||||
steps {
|
||||
script {
|
||||
withCredentials([usernamePassword(credentialsId: 'jenkins_dockreg', passwordVariable: 'DOCKREG_PASS', usernameVariable: 'DOCKREG_USER')]) {
|
||||
sh 'docker login -u ${DOCKREG_USER} -p ${DOCKREG_PASS} ${dockerRegistryRepo} || { echo "Docker login failed!"; exit; }'
|
||||
}
|
||||
docker.withRegistry("${env.dockerRegistryScheme}://${env.dockerRegistryRepo}") {
|
||||
dockerImageObj.push()
|
||||
}
|
||||
|
||||
@ -4,4 +4,5 @@ set -x
|
||||
set -e
|
||||
umask 0000
|
||||
ulimit -n 1024
|
||||
sleep 10
|
||||
exec "$@"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user