Skip to content

Commit 774302e

Browse files
Route Gradle distribution through MASS pull-through cache (#11461)
Route Gradle distribution through MASS pull-through cache Co-authored-by: AlexeyKuznetsov-DD <alexey.kuznetsov@datadoghq.com>
1 parent 654b087 commit 774302e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.gitlab-ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ variables:
4949
BUILD_JOB_NAME: "build"
5050
DEPENDENCY_CACHE_POLICY: pull
5151
BUILD_CACHE_POLICY: pull
52-
GRADLE_VERSION: "8.14.4" # must match gradle-wrapper.properties
52+
GRADLE_VERSION: "8.14.5" # must match gradle-wrapper.properties
53+
MASS_READ_URL: "https://mass-read.us1.ddbuild.io"
5354
MAVEN_REPOSITORY_PROXY: "https://depot-read-api-java.us1.ddbuild.io/magicmirror/magicmirror/@current/"
5455
GRADLE_PLUGIN_PROXY: "https://depot-read-api-java.us1.ddbuild.io/magicmirror/magicmirror/@current/"
5556
BUILDER_IMAGE_REPO: "registry.ddbuild.io/images/mirror/dd-trace-java-docker-build" # images are pinned in images/mirror.lock.yaml in the DataDog/images repo
@@ -228,6 +229,11 @@ default:
228229
- export GRADLE_USER_HOME=$(pwd)/.gradle
229230
# replace maven central part by MAVEN_REPOSITORY_PROXY in .mvn/wrapper/maven-wrapper.properties
230231
- sed -i "s|https://repo.maven.apache.org/maven2/|$MAVEN_REPOSITORY_PROXY|g" .mvn/wrapper/maven-wrapper.properties
232+
# Route Gradle distribution download through MASS pull-through cache
233+
- |
234+
mass_read_host="${MASS_READ_URL#https://}"
235+
mass_read_host="${mass_read_host%/}"
236+
sed -i "/^distributionUrl=/ s|services.gradle.org|${mass_read_host}/internal/artifact/services.gradle.org|" gradle/wrapper/gradle-wrapper.properties
231237
- mkdir -p .mvn/caches
232238
# Redirect Spotless's Equo/Solstice P2 cache into the project tree so it is captured by the GitLab cache.
233239
# Solstice (https://github.com/equodev/equo-ide) defaults to ~/.m2/repository/dev/equo/p2-data, which is outside $CI_PROJECT_DIR.

0 commit comments

Comments
 (0)