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

Do not upgrade jenkins.version if not supported by Jenkinsfile #630

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jonesbusy
Copy link
Collaborator

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@@ -93,6 +95,59 @@ void testPerformUpgradeWithoutBom() {
"""));
}

@Test
void testNoUpgradeIfJenkinsFileDoesNotSupportJava17() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No changes is done there. Since JDK 8 is still referenced and not supported by 2.452.4

@jonesbusy
Copy link
Collaborator Author

@gounthar This should probably not be merged but it would be the approach to not upgrade to a version not supported by the Jenkinsfile.

Sadly on OpenRewrite we cannot configure such thing as declarative precondition. Declarative precondition doesn't support scanning recipes.

Scanning recipes are mandatory to get information accross different LTS (groovy, maven etc...)

So if we want to do that we should add such precondition (can be maybe factorized) on other recipes.

So it's probably better to wait for #630

@jonesbusy jonesbusy force-pushed the feature/condition-on-upgrade-jenkins-version branch from 8a4c213 to ed31769 Compare January 14, 2025 14:28
@jonesbusy jonesbusy force-pushed the feature/condition-on-upgrade-jenkins-version branch from ed31769 to 66c35d4 Compare January 16, 2025 04:25
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.

2 participants