jenkinsci / fstrigger-plugin

https://plugins.jenkins.io/fstrigger/
10 stars 18 forks source link

Modernize to Jenkins 2.440.3 #46

Open sghill-rewrite opened 2 months ago

sghill-rewrite commented 2 months ago

Hi!

This PR aims to move this plugin to the recommended Jenkins baseline version.

If there are additional requirements for accepting PRs - such as additional lag time before adopting a baseline - feel free to reply in the comments.

Testing done

Ran mvn clean verify.

This failed a SpotBugs rule BC_IMPOSSIBLE_CAST. I introduced a different StreamTaskListener to make the cast work.

[ERROR] High: Impossible cast from hudson.model.NullTaskListener to hudson.util.StreamTaskListener in org.jenkinsci.plugins.fstrigger.triggers.FileNameTrigger.start(Node, BuildableItem, boolean, XTriggerLog) [org.jenkinsci.plugins.fstrigger.triggers.FileNameTrigger] At FileNameTrigger.java:[line 91] BC_IMPOSSIBLE_CAST
### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue

Refs: sghill-rewrite/campaigns#4

Closes #43

Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.jenkins.ModernizePlugin?organizationId=SmVua2lucyBDSQ%3D%3D