Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all usages of Develocity and Gradle Enterprise #11102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/repository-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ for [`dependabot/**/**`](https://github.com/open-telemetry/community/blob/main/d

- `GPG_PASSWORD` - stored in OpenTelemetry-Java 1Password
- `GPG_PRIVATE_KEY` - stored in OpenTelemetry-Java 1Password
- `GRADLE_ENTERPRISE_ACCESS_KEY` - owned by [@trask](https://github.com/trask)
- Generated at https://ge.opentelemetry.io > My settings > Access keys
- format of env var is `ge.opentelemetry.io=<access key>`,
see [docs](https://docs.gradle.com/enterprise/gradle-plugin/#via_environment_variable)
- `GRADLE_PUBLISH_KEY`
- `GRADLE_PUBLISH_SECRET`
- `NVD_API_KEY` - stored in OpenTelemetry-Java 1Password
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/build-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ on:
skip-windows-smoke-tests:
type: boolean
required: false
secrets:
GRADLE_ENTERPRISE_ACCESS_KEY:
required: false

permissions:
contents: read
Expand All @@ -39,8 +36,6 @@ jobs:

- name: Spotless
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
cache-read-only: ${{ inputs.cache-read-only }}
Expand Down Expand Up @@ -70,8 +65,6 @@ jobs:

- name: Generate license report
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
# currently ignoring inputs.no-build-cache and always running with --no-build-cache
# see https://github.com/jk1/Gradle-License-Report/issues/231
Expand Down Expand Up @@ -142,8 +135,6 @@ jobs:

- name: Build
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
arguments: check -x javadoc -x spotlessCheck -PskipTests=true ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
Expand Down Expand Up @@ -232,8 +223,6 @@ jobs:
run: .github/scripts/deadlock-detector.sh

- name: List tests
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
with:
# "check" is needed to activate all tests for listing purposes
Expand All @@ -250,8 +239,6 @@ jobs:
echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV

- name: Test
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
with:
# spotless is checked separately since it's a common source of failure
Expand Down Expand Up @@ -334,14 +321,10 @@ jobs:
gradle-home-cache-excludes: caches/build-cache-1

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

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

- name: Upload jvm crash dump files if any
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-daily-no-build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ jobs:
uses: ./.github/workflows/build-common.yml
with:
no-build-cache: true
secrets:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

test-latest-deps:
uses: ./.github/workflows/reusable-test-latest-deps.yml
with:
no-build-cache: true
secrets:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

# muzzle is not included here because it doesn't use gradle cache anyway and so is already covered
# by the normal daily build
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ on:
jobs:
common:
uses: ./.github/workflows/build-common.yml
secrets:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

test-latest-deps:
uses: ./.github/workflows/reusable-test-latest-deps.yml
secrets:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

muzzle:
uses: ./.github/workflows/reusable-muzzle.yml
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ on:
jobs:
common:
uses: ./.github/workflows/build-common.yml
secrets:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

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

muzzle:
# release branches are excluded
Expand Down Expand Up @@ -74,7 +70,6 @@ jobs:

- name: Build and publish artifact snapshots
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
Expand All @@ -87,7 +82,6 @@ jobs:

- name: Build and publish gradle plugin snapshots
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/reusable-test-indy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
no-build-cache:
type: boolean
required: false
secrets:
GRADLE_ENTERPRISE_ACCESS_KEY:
required: false

permissions:
contents: read
Expand Down Expand Up @@ -59,8 +56,6 @@ jobs:
key: ${{ runner.os }}-test-latest-cache-pnpm-modules

- name: List tests
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
with:
arguments: >
Expand All @@ -75,8 +70,6 @@ jobs:

- name: Test
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: >
${{ env.test-tasks }}
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/reusable-test-latest-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
no-build-cache:
type: boolean
required: false
secrets:
GRADLE_ENTERPRISE_ACCESS_KEY:
required: false

permissions:
contents: read
Expand Down Expand Up @@ -55,8 +52,6 @@ jobs:
run: .github/scripts/deadlock-detector.sh

- name: List tests
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
with:
arguments: >
Expand All @@ -72,8 +67,6 @@ jobs:

- name: Test
uses: gradle/actions/setup-gradle@1168cd3d07c1876a65e1724114de42ccbdfa7b78 # v3.2.1
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
with:
arguments: >
${{ env.test-tasks }}
Expand Down
1 change: 0 additions & 1 deletion conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ dependencies {
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18")
implementation("com.github.johnrengelman:shadow:8.1.1")
implementation("org.apache.httpcomponents:httpclient:4.5.14")
implementation("com.gradle.develocity:com.gradle.develocity.gradle.plugin:3.17.1")
implementation("org.owasp:dependency-check-gradle:9.1.0")
implementation("ru.vyarus:gradle-animalsniffer-plugin:1.7.1")
// When updating, also update dependencyManagement/build.gradle.kts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.gradle.enterprise.gradleplugin.testretry.retry
import io.opentelemetry.instrumentation.gradle.OtelJavaExtension
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import java.time.Duration
Expand All @@ -9,7 +8,6 @@ plugins {
checkstyle
codenarc
idea

id("otel.errorprone-conventions")
id("otel.spotless-conventions")
id("org.owasp.dependencycheck")
Expand Down Expand Up @@ -344,13 +342,6 @@ tasks.withType<Test>().configureEach {
// This value is quite big because with lower values (3 mins) we were experiencing large number of false positives
timeout.set(Duration.ofMinutes(15))

develocity.testRetry {
// You can see tests that were retried by this mechanism in the collected test reports and build scans.
if (System.getenv().containsKey("CI") || rootProject.hasProperty("retryTests")) {
maxRetries.set(5)
}
}

reports {
junitXml.isOutputPerTestCase = true
}
Expand Down
47 changes: 0 additions & 47 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pluginManagement {
}

plugins {
id("com.gradle.develocity") version "3.17.1"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
// this can't live in pluginManagement currently due to
// https://github.com/bmuschko/gradle-docker-plugin/issues/1123
Expand All @@ -30,51 +28,6 @@ dependencyResolutionManagement {
}
}

val gradleEnterpriseServer = "https://ge.opentelemetry.io"
val isCI = System.getenv("CI") != null
val geAccessKey = System.getenv("GRADLE_ENTERPRISE_ACCESS_KEY") ?: ""

// if GE access key is not given and we are in CI, then we publish to scans.gradle.com
val useScansGradleCom = isCI && geAccessKey.isEmpty()

if (useScansGradleCom) {
develocity {
buildScan {
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = "yes"
uploadInBackground = !isCI

capture {
fileFingerprints = true
}
}
}
} else {
develocity {
server = gradleEnterpriseServer
buildScan {
uploadInBackground = !isCI
publishing.onlyIf { it.isAuthenticated }

capture {
fileFingerprints = true
}

gradle.startParameter.projectProperties["testJavaVersion"]?.let { tag(it) }
gradle.startParameter.projectProperties["testJavaVM"]?.let { tag(it) }
gradle.startParameter.projectProperties["smokeTestSuite"]?.let {
value("Smoke test suite", it)
}
}
}

buildCache {
remote(develocity.buildCache) {
isPush = isCI && geAccessKey.isNotEmpty()
}
}
}

rootProject.name = "opentelemetry-java-instrumentation"

includeBuild("conventions")
Expand Down
Loading