From 3550f3c124bbc6765e110acfbaccb418356094f9 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 8 Apr 2021 15:47:22 -0700 Subject: [PATCH] Map the /tmp directory between the host Jenkins node and the Docker container. --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6986de98..721adf17 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,7 @@ pipeline { steps { script { docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('adoptopenjdk/openjdk8:latest').inside('-u root -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock') { + docker.image('adoptopenjdk/openjdk8:latest').inside('-u root -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp') { sh "echo 'Setup build environment...'" sh "ci/setup.sh" @@ -68,7 +68,7 @@ pipeline { steps { script { docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('adoptopenjdk/openjdk8:latest').inside("-u root") { + docker.image('adoptopenjdk/openjdk8:latest').inside("-u root -v /tmp:/tmp") { withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) { withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) { @@ -93,7 +93,7 @@ pipeline { steps { script { docker.withRegistry('', 'hub.docker.com-springbuildmaster') { - docker.image('adoptopenjdk/openjdk8:latest').inside("-u root") { + docker.image('adoptopenjdk/openjdk8:latest').inside("-u root -v /tmp:/tmp") { withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) { try { sh "ci/deployDocs.sh"