@@ -7,11 +7,12 @@ buildscript {
77 dependencies {
88 classpath " gradle.plugin.ch.myniva.gradle:s3-build-cache:0.10.0"
99 classpath " com.gradle.enterprise:com.gradle.enterprise.gradle.plugin:3.8"
10+ classpath " com.gradle:common-custom-user-data-gradle-plugin:1.6.2"
1011 }
1112}
1213
13- apply plugin : ' ch.myniva.s3-build-cache'
1414apply plugin : ' com.gradle.enterprise'
15+ apply plugin : " com.gradle.common-custom-user-data-gradle-plugin"
1516
1617rootProject. name = ' testcontainers-examples'
1718
@@ -32,23 +33,30 @@ include 'cucumber'
3233include ' spring-boot-kotlin-redis'
3334include ' spock'
3435
35- ext. isMasterBuild = false ||
36- (System . getenv(" GITHUB_REF" ) == " refs/heads/master" ) ||
37- (System . getenv(" BUILD_SOURCEBRANCHNAME" ) == " master" )
36+ ext. isCI = System . getenv(" CI" ) != null
3837
3938buildCache {
4039 local {
41- enabled = ! isMasterBuild
40+ enabled = ! isCI
4241 }
42+ remote(HttpBuildCache ) {
43+ push = isCI && ! System . getenv(" READ_ONLY_REMOTE_GRADLE_CACHE" )
44+ enabled = true
45+ url = ' https://ge.testcontainers.org/cache/'
46+ credentials {
47+ username = ' ci'
48+ password = System . getenv(" GRADLE_ENTERPRISE_CACHE_PASSWORD" )
49+ }
50+ }
51+ }
4352
44- remote(ch.myniva.gradle.caching.s3.AwsS3BuildCache ) {
45- endpoint = ' fra1.digitaloceanspaces.com'
46- region = ' fra1'
47- bucket = ' testcontainers'
48- path = ' cache'
49- push = isMasterBuild && ! System . getenv(" READ_ONLY_REMOTE_GRADLE_CACHE" )
50- headers = [
51- ' x-amz-acl' : ' public-read'
52- ]
53+ gradleEnterprise {
54+ buildScan {
55+ server = " https://ge.testcontainers.org/"
56+ publishAlways()
57+ publishIfAuthenticated()
58+ uploadInBackground = ! isCI
59+ captureTaskInputFiles = true
5360 }
61+
5462}
0 commit comments