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

Develocity configuration #665

Merged
merged 5 commits into from
Jan 28, 2025
Merged

Conversation

ribafish
Copy link
Contributor

@ribafish ribafish commented Jan 13, 2025

This PR will enable you to publish Build Scans to develocity-staging.eclipse.org as requested here.

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. Local and remote caching was left disabled on this PR by design so that the build is not affected by this change.

The build scans of the Eclipse Mylyn 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 Mylyn project and all other Eclipse projects.

On this Develocity instance, Eclipse Mylyn will have access not only to all of the published build scans but also to other aggregate data features such as:

  • Dashboards to view all historical build scans, along with performance trends over time
  • Build failure analytics for enhanced investigation and diagnosis of build failures
  • Test failure analytics to better understand trends and causes around slow, failing, and flaky tests

This will also enable you to (optionally) use build time optimization features, such as (remote) build caching and Predictive Test Selection.

More information can be read in the Eclipse announcement. This is the first part of Develocity integration issue no. #664. The second part, if you opt for it, would be to enable caching for the project.

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.

Locally, you can authenticate by running mvn develocity:provision-access-key. More info available here

Jenkinsfile Outdated
@@ -10,6 +10,14 @@
* Contributors:
* See git history
*******************************************************************************/
def secrets = [
[path: 'cbi/org.eclipse.mylyn/develocity.eclipse.org', secretValues: [
[envVar: 'DEVELOCITY_ACCESS_KEY', vaultKey: 'develocity-token']

Choose a reason for hiding this comment

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

can you change the value of vaultkey?

[envVar: 'DEVELOCITY_ACCESS_KEY', vaultKey: 'api-token']

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course, I only thought it should be develocity-token because of this comment

Choose a reason for hiding this comment

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

I admit this is confusing. The develocity-token is a Jenkins cred, while your configuration retrieves the secret directly from our secretsmanager. What you did is the preferred way.

@ribafish
Copy link
Contributor Author

@heurtematte, looking at this error (scroll to the bottom) from the CI build, it looks like the jenkins user doesn't have write access to create the following folder /home/jenkins/.m2/.develocity. It's easy to change the develocity dir, if I set it to $WORKSPACE/.m2/.develocity, will that work, or is that the same dir as above when $WORKSPACE is resolved?

@ribafish ribafish requested a review from heurtematte January 13, 2025 12:58
@heurtematte
Copy link

heurtematte commented Jan 13, 2025

@ribafish the develocity directory issue has been fixed with this commit and a new deployment of the instance.

<projectId>org.eclipse.mylyn</projectId>
<buildScan>
<obfuscation>
<username>#{'eclipse-' + env['EF_SHORT_NAME'] + '-bot'}</username>

Choose a reason for hiding this comment

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

Please replace 'eclipse-' + env['EF_SHORT_NAME'] + '-bot' with eclipse-mylyn-bot, this configuration only apply to gitlab-CI. I will update documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the line altogether as discussed on slack.

Removed the develocity dir config and changed how CI is detected in Jenkinsfile + removed the username obfuscation from develocity.xml.
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
Copy link
Contributor

Choose a reason for hiding this comment

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

@ribafish Please provide license header for this new file, you can use an existing .xml file as an example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in 13d4904

@ribafish ribafish force-pushed the ribafish/develocity branch from f2615ff to 13d4904 Compare January 28, 2025 12:53
@ruspl-afed ruspl-afed merged commit cdb0e19 into eclipse-mylyn:main Jan 28, 2025
3 checks passed
@ribafish ribafish deleted the ribafish/develocity branch January 28, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants