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

Apache committers who opt-in (via authentication) can have their local build scans be submitted to ge.apache.org.

Co-authored-by: Clay Johnson <cjohnson@gradle.com>
This commit is contained in:
Nelson Osacky 2023-10-24 17:32:18 +01:00 committed by GitHub
parent c95a8f6513
commit e5b55761d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -15,6 +15,9 @@ jobs:
runs-on: ubuntu-latest
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3

41
gradle/ge.gradle Normal file
View File

@ -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
}
}

View File

@ -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")