Skip to content

Conversation

@lemeurherve
Copy link
Member

@lemeurherve lemeurherve commented Oct 20, 2025

This PR updates versionLT and Compare-VersionLessThan to take in account Jenkins versioning format.

It adds real world example tests from #1456 and linked issues, and removes old one about alpha and beta versions predating current Jenkins versioning format and not used AFAIK.

Ref:

Testing done

make test
$ pwsh
PS > Import-Module -DisableNameChecking -Force ./jenkins-support.psm1
PS > if($(Compare-VersionLessThan '3.12.0.0' '3.12.0-36.vd97de6465d5b_')) { exit 0 } else { exit -1 }  
PS > Write-Output $?

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 demonstrate the feature works or the issue is fixed

@lemeurherve lemeurherve requested a review from a team as a code owner October 20, 2025 09:32
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

Thanks! looks reasonable

@dduportal dduportal enabled auto-merge (squash) October 21, 2025 15:06
@lemeurherve lemeurherve marked this pull request as draft October 22, 2025 08:36
auto-merge was automatically disabled October 22, 2025 08:36

Pull request was converted to draft

@lemeurherve

This comment was marked as resolved.

@lemeurherve lemeurherve marked this pull request as ready for review October 27, 2025 20:50
@lemeurherve lemeurherve enabled auto-merge (squash) October 27, 2025 21:07
@lemeurherve lemeurherve merged commit 85281d0 into jenkinsci:master Oct 27, 2025
11 of 12 checks passed
@lemeurherve lemeurherve deleted the issue1456-fix-versionlt branch October 27, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to upgrade plugin in Docker Jenkins due to version format

4 participants