Skip to content

Apache Lucene open-source search software

Build: build scans on ge.apache.org to benefit from deep build insights (#12293)

Nelson Osackye5b55761d0f5
diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml
index ee5b42f8957..3ed199888d5 100644
--- a/.github/workflows/distribution.yml
+++ b/.github/workflows/distribution.yml
@@ -26,6 +26,8 @@ jobs:
# we want to run the distribution tests on all major OSs, but it's occasionally too slow (or hangs or the forked process is not started at all..., not sure the cause) on windows.
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
+ env:
+ GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/gradle-precommit.yml b/.github/workflows/gradle-precommit.yml
index 3d19d988133..076fb0e095a 100644
--- a/.github/workflows/gradle-precommit.yml
+++ b/.github/workflows/gradle-precommit.yml
@@ -27,6 +27,9 @@ jobs:
# Test JVMs.
java: [ '17' ]
+ env:
+ GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
steps:
- uses: actions/checkout@v3
@@ -58,6 +61,9 @@ jobs:
# Test JVMs.
java: [ '17' ]
+ env:
+ GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/hunspell.yml b/.github/workflows/hunspell.yml
index 37b8f7fb182..ed040ec13c5 100644
--- a/.github/workflows/hunspell.yml
+++ b/.github/workflows/hunspell.yml
@@ -15,6 +15,9 @@ jobs:
runs-on: ubuntu-latest
+ env:
+ GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
+
steps:
- uses: actions/checkout@v3
diff --git a/gradle/ge.gradle b/gradle/ge.gradle
new file mode 100644
index 00000000000..f6bba24f23f
--- /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
+ }
+}
diff --git a/settings.gradle b/settings.gradle
index 7abf89e3249..acb67deb2d6 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -24,8 +24,12 @@ pluginManagement {
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
+ id 'com.gradle.enterprise' version '3.15.1'
+ id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.11.3'
}
+apply from: file('gradle/ge.gradle')
+
rootProject.name = "lucene-root"
includeBuild("dev-tools/missing-doclet")