Skip to content

Commit 46fd50c

Browse files
author
Steve Ramage
committed
ci: use a repository cache (Resolves #319)
1 parent 73a89b3 commit 46fd50c

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

ci/release.Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ pipeline {
345345
sh("""
346346
mkdir -p ./build
347347
./generate-changelog > build/CHANGELOG
348-
./gradlew --no-daemon -I ./build-cache-init.gradle.kts --build-cache build buildPlugin --scan
348+
./gradlew --no-daemon -I ./build-cache-init.gradle.kts -I ./repo-cache-init.gradle.kts --build-cache build buildPlugin --scan
349349
""")
350350
script {
351351
if (env.BRANCH_NAME ==~ /^([0-9][0-9][0-9]\.x)$/) {

repo-cache-init.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
val nexusRepo = System.getenv("NEXUS_REPO")
2+
3+
if (nexusRepo != null) {
4+
println("🔗 Using Nexus repo at: $nexusRepo")
5+
allprojects {
6+
buildscript {
7+
repositories {
8+
maven { url = uri("$nexusRepo/repository/gradle-plugin/") }
9+
}
10+
}
11+
repositories {
12+
maven { url = uri("$nexusRepo/repository/maven-central/") }
13+
}
14+
}
15+
} else {
16+
println("⚠️ NEXUS_REPO is not set. Using default repositories.")
17+
}

0 commit comments

Comments
 (0)