Skip to content

Commit e134164

Browse files
committed
Enable Develocity build scans
1 parent 38257c5 commit e134164

11 files changed

+69
-6
lines changed

.github/repository-settings.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ private admin repo.
1515
- Maximum pull requests to merge: 5
1616
- Only merge non-failing pull requests: CHECKED
1717
- Status check timeout: 60 minutes
18+
19+
## Secrets and variables > Actions
20+
21+
- `DEVELOCITY_ACCESS_KEY` - stored in OpenTelemetry-Java 1Password
22+
- Generated at https://develocity.opentelemetry.io > My settings > Access keys
23+
- Format of env var is `develocity.opentelemetry.io=<access key>`,
24+
see [docs](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable)

.github/workflows/auto-spotless-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636

3737
- name: Spotless
3838
run: ./gradlew spotlessApply
39+
env:
40+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3941

4042
- id: create-patch
4143
name: Create patch file

.github/workflows/build-common.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636

3737
- name: Spotless
3838
run: ./gradlew spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
39+
env:
40+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3941

4042
build:
4143
runs-on: ubuntu-latest
@@ -55,6 +57,8 @@ jobs:
5557

5658
- name: Build
5759
run: ./gradlew build -x spotlessCheck -x test ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
60+
env:
61+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
5862

5963
- name: Check for jApiCmp diffs
6064
# The jApiCmp diff compares current to latest, which isn't appropriate for release branches
@@ -117,6 +121,8 @@ jobs:
117121
"-Porg.gradle.java.installations.auto-download=false"
118122
"-PmaxTestRetries=${{ inputs.max-test-retries }}"
119123
${{ inputs.no-build-cache && '--no-build-cache' || '' }}
124+
env:
125+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
120126

121127
- name: Build scan
122128
if: ${{ !cancelled() && hashFiles('build-scan.txt') != '' }}

.github/workflows/build-daily.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
uses: ./.github/workflows/build-common.yml
1515
with:
1616
no-build-cache: true
17+
secrets:
18+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
1719

1820
link-check:
1921
uses: ./.github/workflows/reusable-link-check.yml

.github/workflows/build-pull-request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
cache-read-only: true
1919
# retry in merge queue to avoid unnecessary failures
2020
max-test-retries: ${{ github.event_name == 'merge_group' && 5 || 0 }}
21+
secrets:
22+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2123

2224
link-check:
2325
uses: ./.github/workflows/reusable-link-check.yml

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ permissions:
1212
jobs:
1313
common:
1414
uses: ./.github/workflows/build-common.yml
15+
secrets:
16+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
1517

1618
# Link check is disabled for push events to avoid unnecessary CI failures
1719
# (these failures will instead be captured by the daily scheduled run)
@@ -42,3 +44,4 @@ jobs:
4244
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
4345
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
4446
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
47+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ jobs:
6363
# --no-daemon is required for codeql to observe the compilation
6464
# (see https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#specifying-build-commands)
6565
run: ./gradlew assemble --no-build-cache --no-daemon
66+
env:
67+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
6668

6769
- name: Perform CodeQL analysis
6870
uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 # v4.30.9

.github/workflows/copilot-setup-steps.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ jobs:
3232

3333
- name: Build project and download dependencies
3434
run: ./gradlew build -x test
35+
env:
36+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

.github/workflows/owasp-dependency-check-daily.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- run: ./gradlew dependencyCheckAnalyze
3333
env:
3434
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
35+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3536

3637
- name: Upload report
3738
if: always()

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ permissions:
1313
jobs:
1414
common:
1515
uses: ./.github/workflows/build-common.yml
16+
secrets:
17+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
1618

1719
release:
1820
permissions:
@@ -97,6 +99,7 @@ jobs:
9799
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
98100
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
99101
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
102+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
100103

101104
- name: Download artifacts from Maven Central (when already published)
102105
if: ${{ inputs.already-published }}
@@ -240,6 +243,7 @@ jobs:
240243
env:
241244
VERSION: ${{ needs.release.outputs.version }}
242245
PRIOR_VERSION: ${{ needs.release.outputs.prior-version }}
246+
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
243247
run: |
244248
./gradlew japicmp -PapiBaseVersion=$PRIOR_VERSION -PapiNewVersion=$VERSION
245249
./gradlew --refresh-dependencies japicmp

0 commit comments

Comments
 (0)