Thanks a lot for this cheatsheet Jean-Marc, that will help for sure plugin maintainers. I've done a few ones this week with this checklist, and it worked for most of them.
On Wed, Dec 14, 2022 at 6:32 PM Jean-Marc Meessen <[email protected]> wrote: > (cross post > <https://community.jenkins.io/t/solving-failing-parent-pom-upgrade-from-4-51-to-4-52-cheatsheet/4958> > from community.jenkins.io) > > If you are like me, > > - wondering why your dependabot PR builds are suddenly failing, > - unsure of the full implications of the latest plugin parent pom > upgrade, > - and fear to waste time solving a problem that others have already > solved, > - don’t trust your memory when having several plugins to maintain. > > > Here are my notes on how to move ahead. > > > Background: > Easily overlooked, the bump of plugin from 4.51 to 4.52 > <https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-4.52> has a > breaking change. The plugin build toolchain now requires at least Java 11 > and at least Jenkins 2.361. > > > Solution: > > - Make sure to use the correct Jenkins baseline > - Disable builds with Java 8 > > > Checklist: > > In the plugin’s pom.xml, > > - Update the parent.pom (in the <parent> section) to 4.52 > - Change the Jenkins base version (<jenkins.version> property) to > 2.361.4 > - Make sure that 2.361.x BOM is used ( > <artifactId>bom-2.361.x</artifactId> and > <version>1723.vcb_9fee52c9fc</version>) > - Make sure that the pom.xml doesn’t force a Java 1.8 compilation > > Make sure that Jenkinsfile specifies builds with the supported JDKs. > (Relying on unknown defaults can bite you.) Your Jenkinsfile should look > like this: > > buildPlugin( > useContainerAgent: true, > configurations: [ > [platform: 'linux', jdk: 17], > [platform: 'windows', jdk: 11], > ] > ) > > > Note: > If you don’t find the above mentioned elements in the pom.xml of the > plugin you maintain, it is probably up for some tidying and > “modernization”. See the Improve a Plugin Tutorial > <https://www.jenkins.io/doc/developer/tutorial-improve/> for hints. > > If you have doubts or this checklist doesn’t work for you, don’t hesitate > to discuss the matter on the developer mailing list. > > /- Jmm > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CABLvyXxOFqBAA1FGJSPQqE-LQmwViTvdtVK%3DZtpw9JqwpqCPvA%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-dev/CABLvyXxOFqBAA1FGJSPQqE-LQmwViTvdtVK%3DZtpw9JqwpqCPvA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- Bruno Verachten -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CACtV%3Ddf8N8AeUvayS-VhRnEakaPsa-B2bnvWej0GQ0e2zJ6tCg%40mail.gmail.com.
