Skip to content

Commit 6365d8a

Browse files
authored
Set remote build cache to push only if authenticated (#13292)
1 parent bbbd153 commit 6365d8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

settings.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ gradleEnterprise {
1919
buildCache {
2020
local { enabled = System.getenv('CI') != 'true' }
2121
remote(HttpBuildCache) {
22-
push = System.getenv('CI') == 'true'
22+
def isAuthenticated = System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER') && System.getenv('GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY')
23+
push = System.getenv('CI') == 'true' && isAuthenticated
2324
enabled = true
2425
url = 'https://ge.grails.org/cache/'
2526
credentials {

0 commit comments

Comments
 (0)