elasticsearch/.ci/init.gradle
Rene Groeschke 51190c7920
[BUILD] Rework build cache authentication on CI (#122296) (#122618)
This is required to update to newer version of gradle enterprise and the gradle enterprise plugin.

(cherry picked from commit 9c19538c06)

# Conflicts:
#	.ci/init.gradle
2025-02-28 04:38:25 +11:00

22 lines
737 B
Groovy

final String buildCacheUrl = System.getProperty('org.elasticsearch.build.cache.url')
final boolean buildCachePush = Boolean.valueOf(System.getProperty('org.elasticsearch.build.cache.push', 'false'))
gradle.settingsEvaluated { settings ->
settings.pluginManager.withPlugin("com.gradle.develocity") {
settings.develocity {
server = "https://gradle-enterprise.elastic.co"
}
if (buildCacheUrl) {
settings.buildCache {
local {
// Disable the local build cache in CI since we use ephemeral workers and it incurs an IO penalty
enabled = false
}
remote(settings.develocity.buildCache) {
enabled = true
push = buildCachePush
}
}
}
}
}