Skip to content

Commit 10ecdce

Browse files
Set remote build cache to push only if authenticated (#7924)
Co-authored-by: Eddú Meléndez Gonzales <[email protected]>
1 parent da2005b commit 10ecdce

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ buildCache {
4343
enabled = !isCI
4444
}
4545
remote(HttpBuildCache) {
46-
push = isCI && !System.getenv("READ_ONLY_REMOTE_GRADLE_CACHE")
46+
push = isCI && !System.getenv("READ_ONLY_REMOTE_GRADLE_CACHE") && System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD")
4747
enabled = true
4848
url = 'https://ge.testcontainers.org/cache/'
4949
credentials {

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ buildCache {
4141
enabled = !isCI
4242
}
4343
remote(HttpBuildCache) {
44-
push = isCI && !System.getenv("READ_ONLY_REMOTE_GRADLE_CACHE")
44+
push = isCI && !System.getenv("READ_ONLY_REMOTE_GRADLE_CACHE") && System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD")
4545
enabled = true
4646
url = 'https://ge.testcontainers.org/cache/'
4747
credentials {

smoke-test/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ buildCache {
2828
enabled = !isCI
2929
}
3030
remote(HttpBuildCache) {
31-
push = isCI && !System.getenv("READ_ONLY_REMOTE_GRADLE_CACHE")
31+
push = isCI && !System.getenv("READ_ONLY_REMOTE_GRADLE_CACHE") && System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD")
3232
enabled = true
3333
url = 'https://ge.testcontainers.org/cache/'
3434
credentials {

0 commit comments

Comments
 (0)