Use the infra.withDockerCredentials() shortcut
This commit is contained in:
parent
006c8f0ec7
commit
803587a160
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -30,9 +30,9 @@ node('docker') {
|
||||
}
|
||||
|
||||
/* Assuming we're not inside of a pull request or multibranch pipeline */
|
||||
if (infra.isTrusted() && (!(env.CHANGE_ID || env.BRANCH_NAME))) {
|
||||
if (!(env.CHANGE_ID || env.BRANCH_NAME)) {
|
||||
stage('Publish container') {
|
||||
withCredentials([[$class: 'ZipFileBinding', credentialsId: 'jenkins-dockerhub', variable: 'DOCKER_CONFIG']]) {
|
||||
infra.withDockerCredentials {
|
||||
timestamps { container.push() }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user