From 278d4f47dd4443cb334ba95e1488ab193c29343e Mon Sep 17 00:00:00 2001 From: jackjii79 Date: Thu, 22 Feb 2024 00:58:57 -0800 Subject: [PATCH] fix --- Jenkinsfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 18aa7679..be900b8f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -169,8 +169,8 @@ pipeline { def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}" withDockerCredentials(DOCKERHUB_CREDS, "FROM_") { withDockerCredentials("harbor.h2o.ai", "TO_") { - withEnv(["XDG_CONFIG_HOME=/tmp"]) { - sh "rm -rf ${XDG_CONFIG_HOME}/google-cloud-tools-java && mkdir -p ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib && echo '{ \"disableUpdateCheck\": false }' > ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json && chmod 666 ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json" + withEnv(["XDG_CONFIG_HOME=/tmp", "XDG_CACHE_HOME=/tmp"]) { + //sh "rm -rf ${XDG_CONFIG_HOME}/google-cloud-tools-java && mkdir -p ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib && echo '{ \"disableUpdateCheck\": false }' > ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json && chmod 666 ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json" sh "./gradlew --init-script init.gradle jib \ -Djib.to.auth.username=${TO_DOCKER_USERNAME} \ -Djib.to.auth.password=${TO_DOCKER_PASSWORD} \ @@ -208,8 +208,8 @@ pipeline { def imageTags = isMasterBranch() || isReleaseBranch() ? "${versionText},${gitCommitHash}" : "${gitCommitHash}" withDockerCredentials(DOCKERHUB_CREDS, "FROM_") { withDockerCredentials(DOCKERHUB_CREDS, "TO_") { - withEnv(["XDG_CONFIG_HOME=/tmp"]) { - sh "rm -rf ${XDG_CONFIG_HOME}/google-cloud-tools-java && mkdir -p ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib && echo '{ \"disableUpdateCheck\": false }' > ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json && chmod 666 ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json" + withEnv(["XDG_CONFIG_HOME=/tmp", "XDG_CACHE_HOME=/tmp"]) { + //sh "rm -rf ${XDG_CONFIG_HOME}/google-cloud-tools-java && mkdir -p ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib && echo '{ \"disableUpdateCheck\": false }' > ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json && chmod 666 ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json" sh "./gradlew --init-script init.gradle jib \ -Djib.to.auth.username=${TO_DOCKER_USERNAME} \ -Djib.to.auth.password=${TO_DOCKER_PASSWORD} \ @@ -247,8 +247,8 @@ pipeline { withDockerCredentials(DOCKERHUB_CREDS, "FROM_") { withGCRCredentials(VORVAN_CRED) { def gcrCreds = readFile("${GCR_JSON_KEY}") - withEnv(['TO_DOCKER_USERNAME=_json_key', "TO_DOCKER_PASSWORD=${gcrCreds}", "XDG_CONFIG_HOME=/tmp"]) { - sh "rm -rf ${XDG_CONFIG_HOME}/google-cloud-tools-java && mkdir -p ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib && echo '{ \"disableUpdateCheck\": false }' > ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json && chmod 666 ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json" + withEnv(['TO_DOCKER_USERNAME=_json_key', "TO_DOCKER_PASSWORD=${gcrCreds}", "XDG_CONFIG_HOME=/tmp", "XDG_CACHE_HOME=/tmp"]) { + //sh "rm -rf ${XDG_CONFIG_HOME}/google-cloud-tools-java && mkdir -p ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib && echo '{ \"disableUpdateCheck\": false }' > ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json && chmod 666 ${XDG_CONFIG_HOME}/google-cloud-tools-java/jib/config.json" sh "./gradlew --init-script init.gradle jib \ -Djib.from.auth.username=${FROM_DOCKER_USERNAME} \ -Djib.from.auth.password=${FROM_DOCKER_PASSWORD} \