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 f0a1ff11538..69fc206de75 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")