You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2024/02/16 21:18:43 UTC

(solr) branch branch_9x updated (11ddf197b71 -> 5fc6af6e2d3)

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

dsmiley pushed a change to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


    from 11ddf197b71 Update caches-warming.adoc (#1238)
     new aedb259d8af Capture build scans on ge.apache.org to benefit from deep build insights (#2042)
     new 5fc6af6e2d3 Build: ge.gradle add tags (#2264)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/bin-solr-test.yml    |  3 ++
 .github/workflows/docker-test.yml      |  1 +
 .github/workflows/gradle-precommit.yml |  3 ++
 .github/workflows/solrj-test.yml       |  3 ++
 gradle/ge.gradle                       | 64 ++++++++++++++++++++++++++++++++++
 settings.gradle                        |  7 ++++
 6 files changed, 81 insertions(+)
 create mode 100644 gradle/ge.gradle


(solr) 01/02: Capture build scans on ge.apache.org to benefit from deep build insights (#2042)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit aedb259d8afd4f14ed08c89022bcdc058656baa1
Author: Clay Johnson <cj...@gradle.com>
AuthorDate: Mon Nov 6 15:37:23 2023 -0600

    Capture build scans on ge.apache.org to benefit from deep build insights (#2042)
    
    Apache committers who opt-in (via authentication) can have their local build scans be submitted to ge.apache.org.
    
    (cherry picked from commit 0b59d371d85bd3d9da3c7cef5514dc286ef8c7a2)
---
 .github/workflows/bin-solr-test.yml    |  3 +++
 .github/workflows/docker-test.yml      |  1 +
 .github/workflows/gradle-precommit.yml |  3 +++
 .github/workflows/solrj-test.yml       |  3 +++
 gradle/ge.gradle                       | 41 ++++++++++++++++++++++++++++++++++
 settings.gradle                        |  7 ++++++
 6 files changed, 58 insertions(+)

diff --git a/.github/workflows/bin-solr-test.yml b/.github/workflows/bin-solr-test.yml
index d8a6076da64..a832bdcc541 100644
--- a/.github/workflows/bin-solr-test.yml
+++ b/.github/workflows/bin-solr-test.yml
@@ -15,6 +15,9 @@ jobs:
 
     runs-on: ubuntu-latest
 
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
     steps:
     # Setup
     - uses: actions/checkout@v2
diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml
index ddf6292d46f..dc8cc9df728 100644
--- a/.github/workflows/docker-test.yml
+++ b/.github/workflows/docker-test.yml
@@ -20,6 +20,7 @@ jobs:
     env:
       SOLR_DOCKER_IMAGE_REPO: github-pr/solr
       SOLR_DOCKER_IMAGE_TAG: ${{github.event.number}}
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
 
     steps:
     # Setup
diff --git a/.github/workflows/gradle-precommit.yml b/.github/workflows/gradle-precommit.yml
index 6cc1425db84..6b4634736f2 100644
--- a/.github/workflows/gradle-precommit.yml
+++ b/.github/workflows/gradle-precommit.yml
@@ -11,6 +11,9 @@ jobs:
 
     runs-on: ubuntu-latest
 
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
     steps:
     # Setup
     - uses: actions/checkout@v2
diff --git a/.github/workflows/solrj-test.yml b/.github/workflows/solrj-test.yml
index 625ab7ee437..0941fcd41c7 100644
--- a/.github/workflows/solrj-test.yml
+++ b/.github/workflows/solrj-test.yml
@@ -14,6 +14,9 @@ jobs:
 
     runs-on: ubuntu-latest
 
+    env:
+      GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
     steps:
     # Setup
     - uses: actions/checkout@v2
diff --git a/gradle/ge.gradle b/gradle/ge.gradle
new file mode 100644
index 00000000000..c718d41af81
--- /dev/null
+++ b/gradle/ge.gradle
@@ -0,0 +1,41 @@
+/*
+ * 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 isCIBuild = System.getenv().keySet().find { it ==~ /(?i)((JENKINS|HUDSON)(_\w+)?|CI)/ } != null
+
+gradleEnterprise {
+    server = "https://ge.apache.org"
+    buildScan {
+        capture { taskInputFiles = true }
+        uploadInBackground = !isCIBuild
+        publishAlways()
+        publishIfAuthenticated()
+        obfuscation {
+            ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0"} }
+        }
+    }
+}
+
+buildCache {
+    local {
+        enabled = !isCIBuild
+    }
+
+    remote(gradleEnterprise.buildCache) {
+        enabled = false
+    }
+}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 50912027467..91e1eb36608 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -22,6 +22,13 @@ pluginManagement {
     }
 }
 
+plugins {
+    id 'com.gradle.enterprise' version '3.15.1'
+    id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.12'
+}
+
+apply from: file('gradle/ge.gradle')
+
 rootProject.name = "solr-root"
 
 includeBuild("dev-tools/solr-missing-doclet")


(solr) 02/02: Build: ge.gradle add tags (#2264)

Posted by ds...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 5fc6af6e2d343c6973a55eaa64104a1e3bbeaee4
Author: David Smiley <ds...@apache.org>
AuthorDate: Fri Feb 16 15:27:28 2024 -0500

    Build: ge.gradle add tags (#2264)
    
    Add tags to make key information more easily noticed and filterable on ge.apache.org
    
    (cherry picked from commit 200c9bf325c3526decc1036d2ab9b948e0e6a896)
---
 gradle/ge.gradle | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gradle/ge.gradle b/gradle/ge.gradle
index c718d41af81..a37660edde6 100644
--- a/gradle/ge.gradle
+++ b/gradle/ge.gradle
@@ -15,10 +15,14 @@
  * limitations under the License.
  */
 
-def isCIBuild = System.getenv().keySet().find { it ==~ /(?i)((JENKINS|HUDSON)(_\w+)?|CI)/ } != null
+// see globals.gradle
+def isCIBuild = System.getenv().keySet().any { it ==~ /(?i)((JENKINS|HUDSON)(_\w+)?|CI)/ }
+
+// https://docs.gradle.com/enterprise/gradle-plugin/
 
 gradleEnterprise {
     server = "https://ge.apache.org"
+
     buildScan {
         capture { taskInputFiles = true }
         uploadInBackground = !isCIBuild
@@ -27,6 +31,25 @@ gradleEnterprise {
         obfuscation {
             ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0"} }
         }
+
+        tag("JDK" + System.getProperty("java.version").find(/\d+/)) // major version
+        value("Java Vendor", System.getProperty("java.vendor"))
+        value("Java Version", System.getProperty("java.version"))
+
+        // Jenkins job name, less redundant "Solr" parts
+        String jenkinsJobName = System.getenv("JOB_NAME")
+        if (jenkinsJobName) { // looks like "Solr/Solr-Smoketest-9.5"
+            tag(jenkinsJobName.replaceAll(/Solr\W/,"")) // like "Smoketest-9.5"
+        }
+
+        // https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
+        if (System.getenv("GITHUB_BASE_REF")) { // only exists for PRs
+            tag("PR")
+        }
+        String ghWorkflowName = System.getenv("GITHUB_WORKFLOW")
+        if (ghWorkflowName) {
+            tag(ghWorkflowName)
+        }
     }
 }