File tree 5 files changed +30
-21
lines changed
5 files changed +30
-21
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ export GRADLE_BUILD_CACHE_USERNAME
44
44
GRADLE_BUILD_CACHE_PASSWORD=$( vault read -field=password secret/ci/elastic-elasticsearch/migrated/gradle-build-cache)
45
45
export GRADLE_BUILD_CACHE_PASSWORD
46
46
47
+ DEVELOCITY_ACCESS_KEY=" gradle-enterprise.elastic.co=$( vault read -field=accesskey secret/ci/elastic-elasticsearch/migrated/gradle-build-cache) "
48
+ export DEVELOCITY_ACCESS_KEY
49
+
47
50
BUILDKITE_API_TOKEN=$( vault read -field=token secret/ci/elastic-elasticsearch/buildkite-api-token)
48
51
export BUILDKITE_API_TOKEN
49
52
Original file line number Diff line number Diff line change
1
+ final String buildCacheUrl = System . getProperty(' org.elasticsearch.build.cache.url' )
2
+ final boolean buildCachePush = Boolean . valueOf(System . getProperty(' org.elasticsearch.build.cache.push' , ' false' ))
3
+
1
4
gradle. settingsEvaluated { settings ->
2
5
settings. pluginManager. withPlugin(" com.gradle.develocity" ) {
3
6
settings. develocity {
4
- server = ' https://gradle-enterprise.elastic.co'
7
+ server = " https://gradle-enterprise.elastic.co"
5
8
}
6
- }
7
- }
8
-
9
- final String buildCacheUrl = System . getProperty(' org.elasticsearch.build.cache.url' )
10
- final boolean buildCachePush = Boolean . valueOf(System . getProperty(' org.elasticsearch.build.cache.push' , ' false' ))
11
-
12
- if (buildCacheUrl) {
13
- gradle. settingsEvaluated { settings ->
14
- settings. buildCache {
15
- local {
16
- // Disable the local build cache in CI since we use ephemeral workers and it incurs an IO penalty
17
- enabled = false
18
- }
19
- remote(HttpBuildCache ) {
20
- url = buildCacheUrl
21
- push = buildCachePush
22
- credentials {
23
- username = System . getenv(" GRADLE_BUILD_CACHE_USERNAME" )
24
- password = System . getenv(" GRADLE_BUILD_CACHE_PASSWORD" )
9
+ if (buildCacheUrl) {
10
+ settings. buildCache {
11
+ local {
12
+ // Disable the local build cache in CI since we use ephemeral workers and it incurs an IO penalty
13
+ enabled = false
14
+ }
15
+ remote(settings. develocity. buildCache) {
16
+ enabled = true
17
+ push = buildCachePush
25
18
}
26
19
}
27
20
}
28
21
}
29
22
}
23
+
24
+
Original file line number Diff line number Diff line change 6
6
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7
7
* License v3.0 only", or the "Server Side Public License, v 1".
8
8
*/
9
+
10
+ plugins {
11
+ id " com.gradle.develocity" version " 3.18.1"
12
+ }
13
+
9
14
rootProject. name = ' build-conventions'
10
15
11
16
dependencyResolutionManagement {
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ pluginManagement {
8
8
includeBuild " ../build-tools"
9
9
}
10
10
11
+ plugins {
12
+ id " com.gradle.develocity" version " 3.18.1"
13
+ }
14
+
11
15
dependencyResolutionManagement {
12
16
versionCatalogs {
13
17
buildLibs {
Original file line number Diff line number Diff line change 9
9
pluginManagement {
10
10
includeBuild " ../build-conventions"
11
11
}
12
-
12
+ plugins {
13
+ id " com.gradle.develocity" version " 3.18.1"
14
+ }
13
15
include ' reaper'
14
16
15
17
dependencyResolutionManagement {
You can’t perform that action at this time.
0 commit comments