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

Apply OpenRewrite recipes RemoveDependencyVersionOverride and AddOrModernizeJenkinsFile #295

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

gounthar
Copy link
Contributor

@gounthar gounthar commented Nov 4, 2024

Hello configurationslicing developers!

This is an automated pull request created by the Jenkins Plugin Modernizer tool. The tool has applied the following recipes to modernize the plugin:

Add Jenkinsfile

io.jenkins.tools.pluginmodernizer.AddOrModernizeJenkinsFile

Updates Jenkinsfile to build with recommended Java versions, platforms, and settings, or creates the file if absent. Also upgrades to a newer parent version, as the new version of the Jenkinsfille uses JDK17 and JDK21.
Add dependency check

io.jenkins.tools.pluginmodernizer.AddDependencyCheck

Adds a dependabot GitHub action to the plugin repository
Add plugins BOM

io.jenkins.tools.pluginmodernizer.AddPluginsBom

Add the Jenkins BOM to the dependenciesManagement section of the pom.xml.
Upgrade parent version

io.jenkins.tools.pluginmodernizer.UpgradeParentVersion

Upgrade the parent version to latest available
Remove dependency version override

io.jenkins.tools.pluginmodernizer.RemoveDependencyVersionOverride

Remove dependencies version override if managed from parent or bom
Remove extra maven properties

io.jenkins.tools.pluginmodernizer.RemoveExtraMavenProperties

Remove extra maven properties from the pom
Migrate from Java 11 to Java 17

io.jenkins.tools.pluginmodernizer.UpgradeToJava17

Migrate from Java 11 to Java 17
Add Jenkinsfile

io.jenkins.tools.pluginmodernizer.AddOrModernizeJenkinsFile

Updates Jenkinsfile to build with recommended Java versions, platforms, and settings, or creates the file if absent. Also upgrades to a newer parent version, as the new version of the Jenkinsfille uses JDK17 and JDK21.
Add dependency check

io.jenkins.tools.pluginmodernizer.AddDependencyCheck

Adds a dependabot GitHub action to the plugin repository
Upgrade to latest recommended core version and ensure the bom is matching the core version

io.jenkins.tools.pluginmodernizer.UpgradeToRecommendCoreVersion

Upgrade to latest recommended core version and ensure the bom is matching the core version
Convert JUnit 4 TestCase to JUnit Jupiter

io.jenkins.tools.pluginmodernizer.MigrateJUnitTestCase

Convert JUnit 4 TestCase to JUnit Jupiter

…ginsBom, UpgradeParentVersion, RemoveDependencyVersionOverride, RemoveExtraMavenProperties, UpgradeToJava17, AddOrModernizeJenkinsFile, AddDependencyCheck, UpgradeToRecommendCoreVersion, MigrateJUnitTestCase
@gounthar gounthar added chore Reduce maintenance and improve developer experience dependencies Pull requests that update a dependency file tests developer labels Nov 4, 2024
@guysoft
Copy link
Contributor

guysoft commented Nov 6, 2024

Any reason not to merge this?

@MarkEWaite MarkEWaite changed the title Applied recipes AddOrModernizeJenkinsFile, AddDependencyCheck, AddPluginsBom, UpgradeParentVersion, RemoveDependencyVersionOverride, RemoveExtraMavenProperties, UpgradeToJava17, AddOrModernizeJenkinsFile, AddDependencyCheck, UpgradeToRecommendCoreVersion, MigrateJUnitTestCase Applied OpenRewrite recipes RemoveDependencyVersionOverride and AddOrModernizeJenkinsFile Nov 6, 2024
@MarkEWaite
Copy link
Contributor

MarkEWaite commented Nov 6, 2024

Any reason not to merge this?

No objection from me.

The odd placement of the end of comment in the Jenkinsfile is a little distracting to me because it is different than the plugin archetype.

The removal of the forkCount setting is a little distracting, since it will cause a trivial increase in the total time for plugin jobs on ci.jenkins.io, but neither of those are worth blocking the pull request. Comparing the time of the jobs on ci.jenkins.io, the forkCount change has added no more than an additional 30 seconds to the job execution. That is not enough savings to retain forkCount. Standard is better.

I've rephrased the pull request title so that it mentions what was changed rather than listing all the recipes that were applied. I think that users want to know about the changes.

@MarkEWaite MarkEWaite changed the title Applied OpenRewrite recipes RemoveDependencyVersionOverride and AddOrModernizeJenkinsFile Apply OpenRewrite recipes RemoveDependencyVersionOverride and AddOrModernizeJenkinsFile Nov 6, 2024
@MarkEWaite MarkEWaite merged commit cf9dc5a into jenkinsci:master Nov 6, 2024
17 checks passed
@gounthar
Copy link
Contributor Author

gounthar commented Nov 6, 2024

I apologize, I should have been more careful and created draft pull requests instead of "real" pull requests using our tool.

To improve the experience, I will add a feature request to list only in the title the recipes that produced different outputs. The current lengthy list can be quite overwhelming, even though the changes were minimal.

Thank you for merging this pull request despite its flaws, Mark.

@MarkEWaite
Copy link
Contributor

@gounthar no problem. Happy to have the pull request. I've applied a change to the Jenkinsfile formatting to make it consistent with the plugin archetype. Thanks for the improvement!

@gounthar
Copy link
Contributor Author

gounthar commented Nov 6, 2024

Thanks a lot, @MarkEWaite .
I opened an issue to track that strange formatting issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Reduce maintenance and improve developer experience dependencies Pull requests that update a dependency file developer tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants