Skip to content

Commit 7710237

Browse files
committed
Update develocity config
1 parent ff4af46 commit 7710237

File tree

9 files changed

+6
-115
lines changed

9 files changed

+6
-115
lines changed

.github/repository-settings.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ for [`dependabot/**/**`](https://github.com/open-telemetry/community/blob/main/d
6868

6969
- `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
7070
- `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
71-
- `GRADLE_ENTERPRISE_ACCESS_KEY` - owned by [@trask](https://github.com/trask)
72-
- Generated at https://ge.opentelemetry.io > My settings > Access keys
73-
- Format of env var is `ge.opentelemetry.io=<access key>`,
74-
see [docs](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable)
7571
- `GRADLE_PUBLISH_KEY`
7672
- `GRADLE_PUBLISH_SECRET`
7773
- `NVD_API_KEY` - stored in OpenTelemetry-Java 1Password

.github/workflows/build-common.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ on:
1515
skip-windows-smoke-tests:
1616
type: boolean
1717
required: false
18-
secrets:
19-
GRADLE_ENTERPRISE_ACCESS_KEY:
20-
required: false
2118

2219
permissions:
2320
contents: read
@@ -45,8 +42,6 @@ jobs:
4542
gradle-home-cache-excludes: caches/build-cache-1
4643

4744
- name: Spotless
48-
env:
49-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
5045
run: ./gradlew spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
5146

5247
gradle-wrapper-validation:
@@ -78,8 +73,6 @@ jobs:
7873
gradle-home-cache-excludes: caches/build-cache-1
7974

8075
- name: Generate license report
81-
env:
82-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
8376
run: ./gradlew generateLicenseReport ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
8477

8578
- name: Check licenses
@@ -149,8 +142,6 @@ jobs:
149142
gradle-home-cache-excludes: caches/build-cache-1
150143

151144
- name: Build
152-
env:
153-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
154145
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
155146
run: ./gradlew check spdxSbom -x javadoc -x spotlessCheck -PskipTests=true ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
156147

@@ -253,8 +244,6 @@ jobs:
253244
gradle-home-cache-excludes: caches/build-cache-1
254245

255246
- name: List tests
256-
env:
257-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
258247
# "check" is needed to activate all tests for listing purposes
259248
# listTestsInPartition writes test tasks that apply to the given partition to a file named
260249
# "test-tasks.txt" and then disables all tasks (including tests) after it runs
@@ -269,8 +258,6 @@ jobs:
269258
echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV
270259
271260
- name: Test
272-
env:
273-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
274261
# spotless is checked separately since it's a common source of failure
275262
run: >
276263
./gradlew
@@ -352,14 +339,10 @@ jobs:
352339
gradle-home-cache-excludes: caches/build-cache-1
353340

354341
- name: Build
355-
env:
356-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
357342
# running suite "none" compiles everything needed by smoke tests without executing any tests
358343
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=none --no-daemon ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
359344

360345
- name: Test
361-
env:
362-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
363346
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
364347

365348
- name: Upload jvm crash dump files if any

.github/workflows/build-daily-no-build-cache.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@ jobs:
1111
uses: ./.github/workflows/build-common.yml
1212
with:
1313
no-build-cache: true
14-
secrets:
15-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
1614

1715
test-latest-deps:
1816
uses: ./.github/workflows/reusable-test-latest-deps.yml
1917
with:
2018
no-build-cache: true
21-
secrets:
22-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
2319

2420
# muzzle is not included here because it doesn't use gradle cache anyway and so is already covered
2521
# by the normal daily build

.github/workflows/build-daily.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ on:
99
jobs:
1010
common:
1111
uses: ./.github/workflows/build-common.yml
12-
secrets:
13-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
1412

1513
test-latest-deps:
1614
uses: ./.github/workflows/reusable-test-latest-deps.yml
17-
secrets:
18-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
1915

2016
muzzle:
2117
uses: ./.github/workflows/reusable-muzzle.yml

.github/workflows/build.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,13 @@ on:
1010
jobs:
1111
common:
1212
uses: ./.github/workflows/build-common.yml
13-
secrets:
14-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
1513

1614
test-latest-deps:
1715
# release branches are excluded
1816
# because any time a new library version is released to maven central it can fail
1917
# which requires unnecessary release branch maintenance, especially for patches
2018
if: "!startsWith(github.ref_name, 'release/')"
2119
uses: ./.github/workflows/reusable-test-latest-deps.yml
22-
secrets:
23-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
2420

2521
muzzle:
2622
# release branches are excluded
@@ -80,7 +76,6 @@ jobs:
8076

8177
- name: Build and publish artifact snapshots
8278
env:
83-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
8479
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
8580
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
8681
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
@@ -89,7 +84,6 @@ jobs:
8984

9085
- name: Build and publish gradle plugin snapshots
9186
env:
92-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
9387
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
9488
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
9589
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

.github/workflows/reusable-test-indy.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
no-build-cache:
1010
type: boolean
1111
required: false
12-
secrets:
13-
GRADLE_ENTERPRISE_ACCESS_KEY:
14-
required: false
1512

1613
permissions:
1714
contents: read
@@ -65,8 +62,6 @@ jobs:
6562
gradle-home-cache-excludes: caches/build-cache-1
6663

6764
- name: List tests
68-
env:
69-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
7065
run: >
7166
./gradlew
7267
check -x spotlessCheck
@@ -78,8 +73,6 @@ jobs:
7873
echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV
7974
8075
- name: Test
81-
env:
82-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
8376
run: >
8477
./gradlew
8578
${{ env.test-tasks }}

.github/workflows/reusable-test-latest-deps.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
no-build-cache:
1010
type: boolean
1111
required: false
12-
secrets:
13-
GRADLE_ENTERPRISE_ACCESS_KEY:
14-
required: false
1512

1613
permissions:
1714
contents: read
@@ -62,8 +59,6 @@ jobs:
6259
gradle-home-cache-excludes: caches/build-cache-1
6360

6461
- name: List tests
65-
env:
66-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
6762
run: >
6863
./gradlew
6964
check -x spotlessCheck
@@ -76,8 +71,6 @@ jobs:
7671
echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV
7772
7873
- name: Test
79-
env:
80-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
8174
run: >
8275
./gradlew
8376
${{ env.test-tasks }}

conventions/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,6 @@ tasks.withType<Test>().configureEach {
366366
// This value is quite big because with lower values (3 mins) we were experiencing large number of false positives
367367
timeout.set(Duration.ofMinutes(15))
368368

369-
develocity.testRetry {
370-
// You can see tests that were retried by this mechanism in the collected test reports and build scans.
371-
if (System.getenv().containsKey("CI") || rootProject.hasProperty("retryTests")) {
372-
maxRetries.set(5)
373-
}
374-
}
375-
376369
reports {
377370
junitXml.isOutputPerTestCase = true
378371
}

settings.gradle.kts

Lines changed: 6 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ pluginManagement {
1313
}
1414

1515
plugins {
16-
id("com.gradle.develocity") version "3.18.2"
1716
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2"
1817
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
1918
// this can't live in pluginManagement currently due to
@@ -22,6 +21,7 @@ plugins {
2221
// ./gradlew :smoke-tests:images:servlet:buildLinuxTestImages pushMatrix -PsmokeTestServer=jetty
2322
// ./gradlew :smoke-tests:images:servlet:buildWindowsTestImages pushMatrix -PsmokeTestServer=jetty
2423
id("com.bmuschko.docker-remote-api") version "9.4.0" apply false
24+
id("com.gradle.develocity") version "3.18.2"
2525
}
2626

2727
dependencyResolutionManagement {
@@ -48,64 +48,11 @@ dependencyResolutionManagement {
4848
}
4949
}
5050

51-
val gradleEnterpriseServer = "https://ge.opentelemetry.io"
52-
val isCI = System.getenv("CI") != null
53-
val geAccessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY") ?: ""
54-
55-
// if GE access key is not given and we are in CI, then we publish to scans.gradle.com
56-
val useScansGradleCom = isCI && geAccessKey.isEmpty()
57-
58-
if (useScansGradleCom) {
59-
develocity {
60-
buildScan {
61-
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
62-
termsOfUseAgree = "yes"
63-
uploadInBackground = !isCI
64-
65-
capture {
66-
fileFingerprints = true
67-
}
68-
69-
if (!gradle.startParameter.taskNames.contains("listTestsInPartition")) {
70-
buildScanPublished {
71-
File("build-scan.txt").printWriter().use { writer ->
72-
writer.println(buildScanUri)
73-
}
74-
}
75-
}
76-
}
77-
}
78-
} else {
79-
develocity {
80-
server = gradleEnterpriseServer
81-
buildScan {
82-
uploadInBackground = !isCI
83-
publishing.onlyIf { it.isAuthenticated }
84-
85-
capture {
86-
fileFingerprints = true
87-
}
88-
89-
gradle.startParameter.projectProperties["testJavaVersion"]?.let { tag(it) }
90-
gradle.startParameter.projectProperties["testJavaVM"]?.let { tag(it) }
91-
gradle.startParameter.projectProperties["smokeTestSuite"]?.let {
92-
value("Smoke test suite", it)
93-
}
94-
95-
if (!gradle.startParameter.taskNames.contains("listTestsInPartition")) {
96-
buildScanPublished {
97-
File("build-scan.txt").printWriter().use { writer ->
98-
writer.println(buildScanUri)
99-
}
100-
}
101-
}
102-
}
103-
}
104-
105-
buildCache {
106-
remote(develocity.buildCache) {
107-
isPush = isCI && geAccessKey.isNotEmpty()
108-
}
51+
develocity {
52+
buildScan {
53+
publishing.onlyIf { System.getenv("CI") != null }
54+
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
55+
termsOfUseAgree.set("yes")
10956
}
11057
}
11158

0 commit comments

Comments
 (0)