From ebe48bd62bdcc20175e17dbdee65e782b6890854 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 8 Apr 2021 15:06:03 -0700 Subject: [PATCH] Create and use different/separate Gradle caches (directory locations) for build, artifacts and docs phases/stages. --- ci/check.sh | 2 +- ci/deployArtifacts.sh | 2 +- ci/deployDocs.sh | 2 +- ci/setup.sh | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ci/check.sh b/ci/check.sh index f313e63f..76178802 100755 --- a/ci/check.sh +++ b/ci/check.sh @@ -2,5 +2,5 @@ set -eou pipefail -GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode-build-cache" \ +GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode/build-gradle-cache" \ ./gradlew clean check --no-daemon --refresh-dependencies --stacktrace diff --git a/ci/deployArtifacts.sh b/ci/deployArtifacts.sh index f12d19cb..a08c0204 100755 --- a/ci/deployArtifacts.sh +++ b/ci/deployArtifacts.sh @@ -7,7 +7,7 @@ set -eou pipefail # Syntax: `chown -R userId:groupId .` chown -R 1001:1001 . -GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp" \ +GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode/artifacts-gradle-cache" \ ./gradlew deployArtifacts finalizeDeployArtifacts --no-build-cache- --no-configuration-cache --no-daemon --stacktrace \ -PartifactoryUsername=$ARTIFACTORY_USERNAME \ -PartifactoryPassword=$ARTIFACTORY_PASSWORD \ diff --git a/ci/deployDocs.sh b/ci/deployDocs.sh index 72ca2359..885c43a4 100755 --- a/ci/deployDocs.sh +++ b/ci/deployDocs.sh @@ -7,7 +7,7 @@ set -eou pipefail # Syntax: `chown -R userId:groupId .` chown -R 1001:1001 . -GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp" \ +GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode/docs-gradle-cache" \ ./gradlew deployDocs --no-daemon --stacktrace \ -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY \ -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME diff --git a/ci/setup.sh b/ci/setup.sh index 11cbd061..0c2394c3 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -6,7 +6,9 @@ echo "Logged in as user [$USER] with home directory [$HOME] in the current working directory [$PWD]" chown -R 1001:1001 . -mkdir -p /tmp/geode-build-cache +mkdir -p /tmp/geode/artifacts-gradle-cache +mkdir -p /tmp/geode/build-gradle-cache +mkdir -p /tmp/geode/docs-gradle-cache echo "Logging into Docker..." docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW} exit 0