build: Add Develocity configuration and enable remote build cache #4862
+50
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will enable you to publish Build Scans to develocity-staging.eclipse.org as explained in the issue #4846.
Description
This PR publishes a build scan for every CI build and for every local build from an authenticated Eclipse committer. The build will not fail if publishing fails. Setting the access key env var was added in relevant CI pipelines, however, the secret will need to be set by Eclipse infra - you can initiate that by opening a helpdesk ticket.
The build scans of the Eclipse EDC Connector project are published to the Develocity instance at develocity-staging.eclipse.org, hosted by the Eclipse Foundation and run in partnership between the Eclipse and Gradle. This Develocity instance has all features and extensions enabled and is freely available for use by the Eclipse EDC Connector project and all other Eclipse projects.
On this Develocity instance, the Eclipse EDC Connector project will have access not only to all of the published build scans but also to other aggregate data features such as:
ci
filter applied.This will also enable you to (optionally) use build time optimization features, such as (remote) build caching and Predictive Test Selection. In this PR, build caching is already configured and enabled.
I ran some tests about build speed improvements when caching is configured with the following results - there is additional ~20s os savings available when the project is relocated, but that would require a fix in the EDC Gradle Plugins / AutodocDependencyInjector. Here are the best case savings:
assemble
test
test -DincludeTags=PostgresqlIntegrationTest -DincludeTags=EndToEndTest -DincludeTags=ComponentTest -DincludeTags=ApiTest
As explained in the Eclipse Develocity documentation, you can start publishing scans locally if you run the
./gradlew provisionDevelocityAccessKey
task, which will take you to develocity-staging.eclipse.org, where you can log in with your eclipse account and confirm access key generation. All the subsequent builds will be published.Caching can be tested without setting up the Develocity credentials - simply run 2 or more builds (the first one will fill the local cache, next ones can use it).
More information can be read in the Eclipse announcement.
Please let me know if there are any questions about the value of Develocity or the changes in this pull request and I’d be happy to address them.
IMPORTANT
To get scans publishing on CI, a helpdesk ticket needs to be opened in order for those credentials to be created, as explained in the initiative documentation.