diff --git a/release/build_nomulus_for_env.sh b/release/build_nomulus_for_env.sh index fc82ef811..2f9cabb53 100755 --- a/release/build_nomulus_for_env.sh +++ b/release/build_nomulus_for_env.sh @@ -34,6 +34,7 @@ gcs_prefix="storage.googleapis.com/domain-registry-maven-repository" # task. (See ./cloudbuild-nomulus.yaml, which calls this script in several # steps). If left at their default location, the caches will be lost after # each step. +# Note: must be consistent with value in ./cloudbuild-nomulus.yaml export GRADLE_USER_HOME="./cloudbuild-caches" if [ "${environment}" == tool ] diff --git a/release/cloudbuild-nomulus.yaml b/release/cloudbuild-nomulus.yaml index 4bb4dd0ec..c2377f975 100644 --- a/release/cloudbuild-nomulus.yaml +++ b/release/cloudbuild-nomulus.yaml @@ -21,7 +21,15 @@ steps: args: ['mkdir', 'nomulus'] # Run tests - name: 'gcr.io/${PROJECT_ID}/builder:latest' - args: ['./gradlew', 'test', '-PskipDockerIncompatibleTests=true'] + # Set home for Gradle caches. Must be consistent with last step below + # and ./build_nomulus_for_env.sh + env: [ 'GRADLE_USER_HOME=./cloudbuild-caches' ] + args: ['./gradlew', + 'test', + '-PskipDockerIncompatibleTests=true', + '-PmavenUrl=https://storage.googleapis.com/domain-registry-maven-repository/maven', + '-PpluginsUrl=https://storage.googleapis.com/domain-registry-maven-repository/plugins' + ] # Build the tool binary and image. - name: 'gcr.io/${PROJECT_ID}/builder:latest' args: ['release/build_nomulus_for_env.sh', 'tool', 'output'] @@ -70,6 +78,9 @@ steps: # server/schema compatibility tests. - name: 'gcr.io/${PROJECT_ID}/builder:latest' entrypoint: /bin/bash + # Set home for Gradle caches. Must be consistent with second step above + # and ./build_nomulus_for_env.sh + env: [ 'GRADLE_USER_HOME=./cloudbuild-caches' ] args: - -c - |