From 37605b4da431d610660d97ae11e181f2aecff268 Mon Sep 17 00:00:00 2001 From: Clay Johnson Date: Wed, 24 May 2023 10:18:57 -0500 Subject: [PATCH] Capture build scans on ge.apache.org to benefit from deep build insights (#5411) --- settings.gradle | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/settings.gradle b/settings.gradle index 9c9cca5e5fb..2dd08dfb2e7 100644 --- a/settings.gradle +++ b/settings.gradle @@ -16,14 +16,36 @@ */ plugins { - id "com.gradle.enterprise" version "3.10.2" + id 'com.gradle.enterprise' version '3.13.2' + id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.10' } +def isGithubActions = System.getenv('GITHUB_ACTIONS') != null +def isJenkins = System.getenv('JENKINS_URL') != null +def isCI = isGithubActions || isJenkins + gradleEnterprise { + server = "https://ge.apache.org" buildScan { - termsOfServiceUrl = 'https://gradle.com/terms-of-service' - termsOfServiceAgree = 'yes' - publishAlwaysIf(System.getenv('CI') != null) + capture { taskInputFiles = true } + uploadInBackground = !isCI + publishAlways() + publishIfAuthenticated() + obfuscation { + // This obfuscates the IP addresses of the build machine in the build scan. + // Alternatively, the build scan will provide the hostname for troubleshooting host-specific issues. + ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0"} } + } + } +} + +buildCache { + local { + enabled = !isCI + } + + remote(gradleEnterprise.buildCache) { + enabled = false } }