Skip to content

Commit d1a0780

Browse files
committed
Attempt to circumvent docker login token timeouts
1 parent e2e9835 commit d1a0780

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Jenkinsfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,12 @@ pipeline {
136136
}
137137
steps {
138138
withCredentials([usernamePassword(credentialsId: 'jc21-dockerhub', passwordVariable: 'dpass', usernameVariable: 'duser')]) {
139+
// Buildx to local cache
140+
sh "./scripts/buildx --cache-to=type=local,dest=cache,mode=max -t ${IMAGE}:build-${BRANCH_LOWER}-${BUILD_NUMBER}"
141+
// Docker Login
139142
sh "docker login -u '${duser}' -p '${dpass}'"
140-
// Buildx with push
141-
sh "./scripts/buildx --push ${BUILDX_PUSH_TAGS}"
143+
// Buildx with push from cache
144+
sh "./scripts/buildx --push --cache-from=type=local,src=cache ${BUILDX_PUSH_TAGS}"
142145
}
143146
}
144147
}

0 commit comments

Comments
 (0)