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

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


The following commit(s) were added to refs/heads/master by this push:
     new c9805160 add build scans to actions
c9805160 is described below

commit c980516050e8e47b1393bdfdf077aca6c7bb20a8
Author: Paul King <[email protected]>
AuthorDate: Fri Dec 13 09:57:04 2024 +1000

    add build scans to actions
---
 .../workflows/{rat-check.yml => license-check.yml} | 14 +++++----
 .../workflows/{rat-check.yml => style-check.yml}   | 15 +++++-----
 geb.gradle                                         |  6 ++--
 gradle/build-scans.gradle                          | 34 ++++++++++++++++++++++
 settings.gradle                                    |  7 ++++-
 5 files changed, 60 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/rat-check.yml 
b/.github/workflows/license-check.yml
similarity index 81%
copy from .github/workflows/rat-check.yml
copy to .github/workflows/license-check.yml
index 31031a79..92551eb9 100644
--- a/.github/workflows/rat-check.yml
+++ b/.github/workflows/license-check.yml
@@ -22,11 +22,7 @@ permissions:
 
 jobs:
   test:
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-latest]
-    runs-on: ${{ matrix.os }}
+    runs-on: ubuntu-latest
     env:
       DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
@@ -40,3 +36,11 @@ jobs:
       - name: Check licenses with rat
         run: ./gradlew rat
         timeout-minutes: 60
+      - name: Check licenses with license plugin
+        run: ./gradlew checkLicense
+        timeout-minutes: 60
+      - name: Upload reports
+        uses: actions/upload-artifact@v4
+        with:
+          name: build-reports
+          path: build/reports/
diff --git a/.github/workflows/rat-check.yml b/.github/workflows/style-check.yml
similarity index 82%
rename from .github/workflows/rat-check.yml
rename to .github/workflows/style-check.yml
index 31031a79..a40ffba6 100644
--- a/.github/workflows/rat-check.yml
+++ b/.github/workflows/style-check.yml
@@ -22,11 +22,7 @@ permissions:
 
 jobs:
   test:
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-latest]
-    runs-on: ${{ matrix.os }}
+    runs-on: ubuntu-latest
     env:
       DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
     steps:
@@ -37,6 +33,11 @@ jobs:
           java-version: 21
           check-latest: true
       - uses: gradle/actions/setup-gradle@v4
-      - name: Check licenses with rat
-        run: ./gradlew rat
+      - name: Check licenses with Codenarc
+        run: ./gradlew codenarcMain
         timeout-minutes: 60
+      - name: Upload reports
+        uses: actions/upload-artifact@v4
+        with:
+          name: build-reports
+          path: build/reports/
diff --git a/geb.gradle b/geb.gradle
index fe68c9b9..446b0ef8 100644
--- a/geb.gradle
+++ b/geb.gradle
@@ -67,9 +67,9 @@ nexusPublishing {
     }
 }
 
-extensions.findByName("gradleEnterprise")?.buildScan {
-    termsOfServiceUrl = 'https://gradle.com/terms-of-service'
-    termsOfServiceAgree = 'yes'
+extensions.findByName("develocity")?.buildScan {
+    termsOfUseUrl = 'https://gradle.com/terms-of-service'
+    termsOfUseAgree = 'yes'
 }
 
 tasks.register("stage", Sync) {
diff --git a/gradle/build-scans.gradle b/gradle/build-scans.gradle
new file mode 100644
index 00000000..311ff364
--- /dev/null
+++ b/gradle/build-scans.gradle
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+def env = System.getenv()
+boolean isCI = env.CI || env.TEAMCITY_VERSION || env.GITHUB_ACTIONS
+
+develocity {
+    server = "https://ge.apache.org";
+    allowUntrustedServer = false
+
+    buildScan {
+        uploadInBackground = !isCI
+        publishing.onlyIf { it.authenticated }
+        obfuscation {
+            ipAddresses { addresses -> addresses.collect { address -> 
"0.0.0.0" } }
+        }
+    }
+}
diff --git a/settings.gradle b/settings.gradle
index ccfde904..c96a99a2 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -18,9 +18,14 @@
  */
 plugins {
     id "org.kordamp.gradle.oci-build-cache" version "0.6.0"
-    id("org.gradle.toolchains.foojay-resolver") version "0.8.0"
+    id "org.gradle.toolchains.foojay-resolver" version "0.8.0"
+    // Check https://gradle.com/enterprise/releases with new versions. GE 
plugin version should not lag behind Gradle version, but before
+    // updating this, check the compatibility from 
https://docs.gradle.com/enterprise/compatibility/#develocity_compatibility and 
https://ge.apache.org/scans.
+    id "com.gradle.develocity" version "3.18.2"
 }
 
+apply from: 'gradle/build-scans.gradle'
+
 include "module",
     "module:geb-core",
     "module:geb-spock",

Reply via email to