diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b027da64e23..267fe3347d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,7 @@ variables: DEPENDENCY_CACHE_POLICY: pull BUILD_CACHE_POLICY: pull GRADLE_VERSION: "8.4" # must match gradle-wrapper.properties + MAVEN_REPOSITORY_PROXY: "https://artifactual.us1.prod.dog/repository/maven-central/" JAVA_BUILD_IMAGE_VERSION: "v25.01" REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations" PROFILE_TESTS: @@ -74,7 +75,7 @@ default: policy: $BUILD_CACHE_POLICY before_script: - export GRADLE_USER_HOME=`pwd`/.gradle - - export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS" + - export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS -PmavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY" - *normalize_node_index # for weird reasons, gradle will always "chmod 700" the .gradle folder # with Gitlab caching, .gradle is always owned by root and thus gradle's chmod invocation fails @@ -199,10 +200,8 @@ muzzle: needs: [ build ] stage: tests parallel: 8 - rules: - - when: never variables: - BUILD_CACHE_TYPE: test + BUILD_CACHE_TYPE: lib script: - export SKIP_BUILDSCAN="true" - ./gradlew writeMuzzleTasksToFile $GRADLE_ARGS diff --git a/gradle/repositories.gradle b/gradle/repositories.gradle index 2b25aae70a0..0b0a3e7ecd8 100644 --- a/gradle/repositories.gradle +++ b/gradle/repositories.gradle @@ -1,4 +1,9 @@ repositories { + if (project.rootProject.hasProperty("mavenRepositoryProxy")) { + maven { + url project.rootProject.property("mavenRepositoryProxy") + } + } mavenLocal() mavenCentral() // add sonatype repository for snapshot dependencies