jenkinsci / templating-engine-plugin

create tool-agnostic, templated pipelines to be shared by multiple teams
https://jenkinsci.github.io/templating-engine-plugin/latest/
Apache License 2.0
171 stars 58 forks source link

Upgrade Jenkins Baseline and Gradle #321

Closed sghill closed 1 year ago

sghill commented 1 year ago

PR Details

Hi :wave:, I maintain the jpi plugin and was looking into how hard upgrades are.

This PR upgrades Jenkins and tools to their last versions that supported Java 8. It also upgrades Gradle to the latest release, updating deprecations with their recommended replacements along the way.

Description

The current recommendation for a Jenkins Baseline is 2.375.x and up. Starting with 2.263.1, Jenkins requires Java 11 to build. To minimize changes in this PR, I upgraded to the most recent LTS that supports Java 8.

Spotless has been upgraded to 6.13.0, the last version that does not require Java 11.

The JPI plugin has been upgraded to the latest published version. I can release the final version of 0.50.0 before we merge this if that's preferred. Various properties have been updated to their Gradle lazy property replacements.

The Jenkins-managed plugins bom has been included to determine compatible plugin dependency versions. Plugin dependency versions have been removed if they're in the bom I thought leaving the versions defined was misleading, since conflict resolution with the bom means the bom's version wins anyway.

Additional Groovy source files have been allowed as upgrading Jenkins meant that the ResumabilitySpec Restart mid-step resumes successfully failed by being disallowed from loading StepWrapperCPS. If this is only useful for tests, the extension could be defined in test sources instead.

How Has This Been Tested

Ran existing tests (./gradlew clean build) on an Ubuntu bionic machine

Types of Changes

Checklist

sghill commented 1 year ago

@steven-terrana is something you'd be interested in?

steven-terrana-bah commented 1 year ago

hey @sghill - absolutely!

Thanks for your patience :) - work has been a bit hectic.

I'll review this ASAP and get it merged.

Appreciate you!

sghill commented 1 year ago

Awesome! No rush. This test stopped failing for me locally after I added the next extension, not sure why it's failing here 🤔

steven-terrana-bah commented 1 year ago

it's been a nagging issue for a while that i can't seem to pin down - it's always worked locally for me too.