Abacn commented on code in PR #26351:
URL: https://github.com/apache/beam/pull/26351#discussion_r1198336958


##########
settings.gradle.kts:
##########
@@ -15,34 +15,45 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+import 
com.gradle.enterprise.gradleplugin.internal.extension.BuildScanExtensionWithHiddenFeatures
 
 plugins {
-  id("com.gradle.enterprise") version "3.4.1" apply false
+  id("com.gradle.enterprise") version "3.13.2"
+  id("com.gradle.common-custom-user-data-gradle-plugin") version "1.10"
 }
 
 
-// Plugins which require online access should not be enabled when running in 
offline mode.
-if (!gradle.startParameter.isOffline) {
-  apply(plugin = "com.gradle.enterprise")
-}
-
 // JENKINS_HOME and BUILD_ID set automatically during Jenkins execution
 val isJenkinsBuild = arrayOf("JENKINS_HOME", "BUILD_ID").all { 
System.getenv(it) != null }
 // GITHUB_REPOSITORY and GITHUB_RUN_ID set automatically during Github Actions 
run
 val isGithubActionsBuild = arrayOf("GITHUB_REPOSITORY", "GITHUB_RUN_ID").all { 
System.getenv(it) != null }
-if (isJenkinsBuild || isGithubActionsBuild) {
-  gradleEnterprise {
-    buildScan {
-      // Build Scan enabled and TOS accepted for Jenkins lab build. This does 
not apply to builds on
-      // non-Jenkins machines. Developers need to separately enable and accept 
TOS to use build scans.
-      termsOfServiceUrl = "https://gradle.com/terms-of-service";
-      termsOfServiceAgree = "yes"
-      publishAlways()
+val isCi = isJenkinsBuild || isGithubActionsBuild
+
+gradleEnterprise {
+  server = "https://ge.apache.org";
+  allowUntrustedServer = false
+
+  buildScan {
+    capture { isTaskInputFiles = true }
+    isUploadInBackground = !isCi
+    publishAlways()
+    this as BuildScanExtensionWithHiddenFeatures
+    publishIfAuthenticated()
+    obfuscation {
+      ipAddresses { addresses -> addresses.map { "0.0.0.0" } }
     }
   }
 }
 
+buildCache {
+  local {
+    isEnabled = !isCi
+  }
+  remote(gradleEnterprise.buildCache) {
+    isEnabled = false

Review Comment:
   I see this is deliberately disabled. What is the reasoning behind this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to