Skip to content

Commit 421f31e

Browse files
committed
need a little more
1 parent fe06ef4 commit 421f31e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Jenkinsfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ pipeline {
4444
withCredentials([usernamePassword(credentialsId: 'jenkins-dockerhub', usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD'),
4545
usernamePassword(credentialsId: 'jenkins-central', usernameVariable: 'CENTRAL_USER', passwordVariable: 'CENTRAL_PASS'),
4646
string(credentialsId: 'jenkins-gpg', variable: 'GPG_PASS')]) {
47-
sh 'docker buildx create --name multiarch --driver docker-container --platform linux/amd64,linux/arm64 --use || docker buildx use multiarch'
47+
sh '''
48+
docker context create multiarch-context --docker "host=$DOCKER_HOST,ca=/certs/client/ca.pem,cert=/certs/client/cert.pem,key=/certs/client/key.pem" || echo "Context exists"
49+
docker buildx create --name multiarch --driver docker-container --platform linux/amd64,linux/arm64 --use multiarch-context || docker buildx use multiarch
50+
'''
4851
withMaven {
4952
sh "./jdk-wrapper.sh ./mvnw $target -P rpm -U -B -Dstyle.color=always -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Ddocker.verbose=true"
5053
}

0 commit comments

Comments
 (0)