This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 3915ba8121a7b5f4e649bbee3c5e83032c6b43dd
Author: Clay Johnson <[email protected]>
AuthorDate: Wed Apr 19 21:50:43 2023 +0800

    GROOVY-11133: Capture build scans on ge.apache.org
---
 .github/workflows/grails-joint-validation.yml    |  2 +
 .github/workflows/groovy-build-coverage.yml      |  2 +
 .github/workflows/groovy-build-dist.yml          |  2 +
 .github/workflows/groovy-build-test-19.yml       |  2 +
 .github/workflows/groovy-build-test-ea.yml       |  2 +
 .github/workflows/groovy-build-test.yml          |  2 +
 .github/workflows/micronaut-joint-validation.yml |  2 +
 gradle/build-scans.gradle                        | 47 ++++++++++--------------
 settings.gradle                                  |  1 +
 9 files changed, 34 insertions(+), 28 deletions(-)

diff --git a/.github/workflows/grails-joint-validation.yml 
b/.github/workflows/grails-joint-validation.yml
index f5b017b0a7..d16a4a0bf3 100644
--- a/.github/workflows/grails-joint-validation.yml
+++ b/.github/workflows/grails-joint-validation.yml
@@ -36,6 +36,8 @@ jobs:
         os: [ubuntu-20.04]
         java: [11.0.9]
     runs-on: ${{ matrix.os }}
+    env:
+        GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
       - uses: actions/checkout@v3
       - name: Set up JDK
diff --git a/.github/workflows/groovy-build-coverage.yml 
b/.github/workflows/groovy-build-coverage.yml
index be2e573fa0..d6d48f494c 100644
--- a/.github/workflows/groovy-build-coverage.yml
+++ b/.github/workflows/groovy-build-coverage.yml
@@ -28,6 +28,8 @@ jobs:
         os: [ubuntu-22.04]
         java: [17]
     runs-on: ${{ matrix.os }}
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
       - uses: actions/checkout@v3
       - name: Set up JDK
diff --git a/.github/workflows/groovy-build-dist.yml 
b/.github/workflows/groovy-build-dist.yml
index bb57498242..3af37bc48f 100644
--- a/.github/workflows/groovy-build-dist.yml
+++ b/.github/workflows/groovy-build-dist.yml
@@ -25,6 +25,8 @@ jobs:
         os: [ubuntu-20.04]
         java: [17]
     runs-on: ${{ matrix.os }}
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
       - uses: actions/checkout@v3
       - name: Set up JDK
diff --git a/.github/workflows/groovy-build-test-19.yml 
b/.github/workflows/groovy-build-test-19.yml
index 86933d0677..97491a9a76 100644
--- a/.github/workflows/groovy-build-test-19.yml
+++ b/.github/workflows/groovy-build-test-19.yml
@@ -27,6 +27,8 @@ jobs:
       matrix:
         os: [ubuntu-20.04]
     runs-on: ${{ matrix.os }}
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
       - uses: actions/checkout@v3
       - name: Set up JDKs
diff --git a/.github/workflows/groovy-build-test-ea.yml 
b/.github/workflows/groovy-build-test-ea.yml
index ebee8d8675..700a02253e 100644
--- a/.github/workflows/groovy-build-test-ea.yml
+++ b/.github/workflows/groovy-build-test-ea.yml
@@ -31,6 +31,8 @@ jobs:
         jdk: 
["https://download.java.net/java/GA/jdk20/bdc68b4b9cbc4ebcb30745c85038d91d/36/GPL/openjdk-20_linux-x64_bin.tar.gz";,
               
"https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz";]
     runs-on: ${{ matrix.os }}
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
       - name: Download JDK ${{ matrix.jdk }}
         run: wget -c ${{ matrix.jdk }} -O /tmp/openjdk.tar.gz
diff --git a/.github/workflows/groovy-build-test.yml 
b/.github/workflows/groovy-build-test.yml
index 8ab583179f..fdc3d7faf0 100644
--- a/.github/workflows/groovy-build-test.yml
+++ b/.github/workflows/groovy-build-test.yml
@@ -25,6 +25,8 @@ jobs:
         os: [ubuntu-20.04]
         java: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
     runs-on: ${{ matrix.os }}
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
       - uses: actions/checkout@v3
       - name: Set up JDK
diff --git a/.github/workflows/micronaut-joint-validation.yml 
b/.github/workflows/micronaut-joint-validation.yml
index e5a61398ca..68f73a9f10 100644
--- a/.github/workflows/micronaut-joint-validation.yml
+++ b/.github/workflows/micronaut-joint-validation.yml
@@ -28,6 +28,8 @@ jobs:
       matrix:
         os: [ubuntu-latest]
     runs-on: ${{ matrix.os }}
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
       - uses: actions/checkout@v3
       - name: Set up JDK
diff --git a/gradle/build-scans.gradle b/gradle/build-scans.gradle
index 5b4af89eec..2b749d096c 100644
--- a/gradle/build-scans.gradle
+++ b/gradle/build-scans.gradle
@@ -17,39 +17,30 @@
  *  under the License.
  */
 
-def acceptFile = new File(gradle.gradleUserHomeDir, 
"gradle-scans-license-agree.txt")
 def env = System.getenv()
 boolean isCI = env.CI || env.TRAVIS || env.TEAMCITY_VERSION || 
env.GITHUB_ACTIONS
-boolean hasAccepted = isCI || env.GRADLE_SCANS_ACCEPT=='yes' || 
acceptFile.exists() && acceptFile.text.trim() == 'yes'
-boolean hasRefused = env.GRADLE_SCANS_ACCEPT=='no' || acceptFile.exists() && 
acceptFile.text.trim() == 'no'
 
 gradleEnterprise {
-    buildScan {
-        if (hasAccepted) {
-            termsOfServiceAgree = 'yes'
-            publishAlways()
-        } else if (!hasRefused) {
-            gradle.buildFinished {
-                println """
-This build uses Gradle Build Scans to gather statistics, share information 
about
-failures, environmental issues, dependencies resolved during the build and 
more.
-Build scans will be published after each build, if you accept the terms of
-service, and in particular the privacy policy.
-
-Please read
+    server = "https://ge.apache.org";
+    allowUntrustedServer = false
 
-    https://gradle.com/terms-of-service
-    https://gradle.com/legal/privacy
-
-and then:
+    buildScan {
+        capture { taskInputFiles = true }
+        uploadInBackground = !isCI
+        publishAlways()
+        publishIfAuthenticated()
+        obfuscation {
+            ipAddresses { addresses -> addresses.collect { address -> 
"0.0.0.0" } }
+        }
+    }
+}
 
-  - set the `GRADLE_SCANS_ACCEPT` to `yes`/`no` if you agree with/refuse the 
TOS
-  - or create the ${acceptFile} file with `yes`/`no` in it if you agree 
with/refuse
+buildCache {
+    local {
+        enabled = !isCI
+    }
 
-And we'll not bother you again. Note that build scans are only made public if
-you share the URL at the end of the build.
-"""
-            }
-        }
+    remote(gradleEnterprise.buildCache) {
+        enabled = false
     }
-}
\ No newline at end of file
+}
diff --git a/settings.gradle b/settings.gradle
index 404cbd2c3d..55d8b500fe 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -32,6 +32,7 @@ pluginManagement {
 plugins {
     // Before updating this, please check the compatibility from 
https://docs.gradle.com/enterprise/compatibility/#develocity_compatibility and 
https://ge.apache.org/scans.
     id "com.gradle.enterprise" version "3.16.2"
+    id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.12.1'
 }
 
 apply from: 'gradle/build-scans.gradle'

Reply via email to