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

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 805cf59180 Implemented: Capture build scans on ge.apache.org to 
benefit from deep build insights (OFBIZ-12826) (#641)
805cf59180 is described below

commit 805cf59180f281020d7404b886c03ebaf9295ddc
Author: Clay Johnson <cjohn...@gradle.com>
AuthorDate: Tue Jun 27 08:41:34 2023 -0500

    Implemented: Capture build scans on ge.apache.org to benefit from deep 
build insights (OFBIZ-12826) (#641)
    
    This PR publishes a build scan for every CI build and possibly for every 
local build from an authenticated Apache committer. The build will not fail if 
publishing fails.
    
    The build scans of the Apache OFBiz project are published to the Gradle 
Enterprise instance at ge.apache.org, hosted by the Apache Software Foundation 
and run in partnership between the ASF and Gradle. This Gradle Enterprise 
instance has all features and extensions enabled and is freely available for 
use by the Apache OFBiz project and all other Apache projects.
    
    This pull request enhances the functionality of publishing build scans to 
the publicly available scans.gradle.com by instead publishing build scans to 
ge.apache.org. On this Gradle Enterprise instance, Apache OFBiz will have 
access not only to all of the published build scans but also to other aggregate 
data features.
---
 .github/workflows/gradle.yaml |  3 +++
 settings.gradle               | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/.github/workflows/gradle.yaml b/.github/workflows/gradle.yaml
index 37ede81be8..8e8c6ac1cf 100644
--- a/.github/workflows/gradle.yaml
+++ b/.github/workflows/gradle.yaml
@@ -30,6 +30,9 @@ jobs:
 
     runs-on: ubuntu-latest
 
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
     steps:
     - uses: actions/checkout@v3
     - name: Set up JDK 17
diff --git a/settings.gradle b/settings.gradle
index 8822402a93..41f41b3608 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -17,6 +17,38 @@
  * under the License.
  */
 
+plugins {
+    id 'com.gradle.enterprise' version '3.13.3'
+    id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.10'
+}
+
+def isCI = System.getenv('GITHUB_ACTIONS') != null
+
+gradleEnterprise {
+    server = "https://ge.apache.org";
+    buildScan {
+        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
+    }
+}
+
 apply from: 'common.gradle'
 rootProject.name = 'ofbiz'
 

Reply via email to