Use the infra.withDockerCredentials() shortcut

This commit is contained in:
R. Tyler Croy 2017-06-29 14:18:39 -07:00
parent 006c8f0ec7
commit 803587a160
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F

4
Jenkinsfile vendored
View File

@ -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() }
}
}