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

MINOR: Capture build scans on ge.apache.org to benefit from deep build insights #13676

Merged
merged 4 commits into from
Jul 12, 2023
Merged
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
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ plugins {
id "io.swagger.core.v3.swagger-gradle-plugin" version "2.2.8"

id "com.github.spotbugs" version '5.0.13' apply false
id 'org.gradle.test-retry' version '1.5.2' apply false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test-retry plugin is bundled with the Gradle Enterprise plugin.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clayburn is apache Kafka using Gradle entreprise ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what this PR proposes, publishing build scans to the Gradle Enterprise instance at https://ge.apache.org. You can see the configuration in the settings.gradle portion of the PR.

Because the Gradle Enterprise Gradle Plugin bundles in the test-retry plugin, it is necessary to remove these lines. Otherwise test-retry will be loaded twice and fail. The retry functionality remains the same.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the license for the gradle enterprise plugin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, usage of the Gradle Enterprise Gradle Plugin is covered by a license agreement between Gradle and the ASF.

id 'org.scoverage' version '7.0.1' apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'com.diffplug.spotless' version '6.14.0' apply false // 6.14.1 and newer require Java 11 at compile time, so we can't upgrade until AK 4.0
Expand Down Expand Up @@ -227,7 +226,6 @@ subprojects {
apply plugin: 'java-library'
apply plugin: 'checkstyle'
apply plugin: "com.github.spotbugs"
apply plugin: 'org.gradle.test-retry'

// We use the shadow plugin for the jmh-benchmarks module and the `-all` jar can get pretty large, so
// don't publish it
Expand Down
34 changes: 34 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,40 @@
// See the License for the specific language governing permissions and
// limitations under the License.

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

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"} }
clayburn marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

buildCache {
local {
enabled = !isCI
}

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

include 'clients',
'connect:api',
'connect:basic-auth-extension',
Expand Down