Create and use different/separate Gradle caches (directory locations) for build, artifacts and docs phases/stages.

This commit is contained in:
John Blum
2021-04-08 15:06:03 -07:00
parent 11e8e7aa3b
commit ebe48bd62b
4 changed files with 6 additions and 4 deletions

View File

@@ -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

View File

@@ -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 \

View File

@@ -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

View File

@@ -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