Skip to content

Commit

Permalink
GEODE-10446: Capture build scans on ge.apache.org to benefit from dee…
Browse files Browse the repository at this point in the history
…p build insights (#7879)
  • Loading branch information
clayburn authored Jun 12, 2023
1 parent b3675f6 commit 77f1afd
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
permissions:
actions: read
contents: read
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
Expand All @@ -50,6 +52,8 @@ jobs:
distribution: [ 'liberica' ]
java: ['11']
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK (include all 3 JDKs in the env)
Expand Down Expand Up @@ -91,6 +95,8 @@ jobs:
distribution: ['liberica']
java: ['8', '11', '17']
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK (include all 3 JDKs in env)
Expand Down Expand Up @@ -148,6 +154,8 @@ jobs:
distribution: ['liberica']
java: ['8']
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
Expand Down Expand Up @@ -195,6 +203,8 @@ jobs:
distribution: ['liberica']
java: ['8']
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
Expand Down Expand Up @@ -235,6 +245,8 @@ jobs:
distribution: ['liberica']
java: ['8']
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
Expand Down Expand Up @@ -277,6 +289,8 @@ jobs:
distribution: ['liberica']
java: ['8']
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
Expand Down Expand Up @@ -319,6 +333,8 @@ jobs:
distribution: ['liberica']
java: ['8']
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
Expand Down Expand Up @@ -361,6 +377,8 @@ jobs:
distribution: ['liberica']
java: ['8']
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
Expand Down Expand Up @@ -405,6 +423,8 @@ jobs:
distribution: [ 'liberica' ]
java: [ '8' ]
runs-on: ${{ matrix.os }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK
Expand Down
30 changes: 29 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,30 @@ pluginManagement {
includeBuild('build-tools/scripts')
}

plugins {
id 'com.gradle.enterprise' version '3.13.2'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '1.10'
}

def isGithubActions = System.getenv('GITHUB_ACTIONS') != null
def isJenkins = System.getenv('JENKINS_URL') != null
def isCI = isGithubActions || isJenkins

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

rootProject.name = 'geode'

// We want to see all test results. This is equivalent to setting --continue on the command line.
Expand Down Expand Up @@ -119,6 +143,10 @@ if (GradleVersion.current() < GradleVersion.version(minimumGradleVersion)) {

buildCache {
local {
enabled = true
enabled = !isCI
}

remote(gradleEnterprise.buildCache) {
enabled = false
}
}

0 comments on commit 77f1afd

Please sign in to comment.