Skip to content

Commit da4853b

Browse files
Use internal artifact proxy for Gitlab jobs (#8554)
* Use internal proxy for maven artifacts in Gitlab * fix proxy url
1 parent ef1ed74 commit da4853b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ variables:
2323
DEPENDENCY_CACHE_POLICY: pull
2424
BUILD_CACHE_POLICY: pull
2525
GRADLE_VERSION: "8.4" # must match gradle-wrapper.properties
26+
MAVEN_REPOSITORY_PROXY: "https://artifactual.us1.prod.dog/repository/maven-central/"
2627
JAVA_BUILD_IMAGE_VERSION: "v25.01"
2728
REPO_NOTIFICATION_CHANNEL: "#apm-java-escalations"
2829
PROFILE_TESTS:
@@ -74,7 +75,7 @@ default:
7475
policy: $BUILD_CACHE_POLICY
7576
before_script:
7677
- export GRADLE_USER_HOME=`pwd`/.gradle
77-
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS"
78+
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS -PmavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY"
7879
- *normalize_node_index
7980
# for weird reasons, gradle will always "chmod 700" the .gradle folder
8081
# with Gitlab caching, .gradle is always owned by root and thus gradle's chmod invocation fails
@@ -199,10 +200,8 @@ muzzle:
199200
needs: [ build ]
200201
stage: tests
201202
parallel: 8
202-
rules:
203-
- when: never
204203
variables:
205-
BUILD_CACHE_TYPE: test
204+
BUILD_CACHE_TYPE: lib
206205
script:
207206
- export SKIP_BUILDSCAN="true"
208207
- ./gradlew writeMuzzleTasksToFile $GRADLE_ARGS

gradle/repositories.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
repositories {
2+
if (project.rootProject.hasProperty("mavenRepositoryProxy")) {
3+
maven {
4+
url project.rootProject.property("mavenRepositoryProxy")
5+
}
6+
}
27
mavenLocal()
38
mavenCentral()
49
// add sonatype repository for snapshot dependencies

0 commit comments

Comments
 (0)