pycontribs / jenkinsapi

A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
http://pypi.python.org/pypi/jenkinsapi
MIT License
857 stars 483 forks source link

Accounting for the new versioning style of the credentials plugin. #817

Closed chrisguidry closed 2 years ago

chrisguidry commented 2 years ago

Starting in December 2021, after version 2.6.2, the credentials plugin adopted a new versioning scheme:

https://github.com/jenkinsci/credentials-plugin/releases

1055.v1346ba467ba1 1061.vb_1fceb_58fa_18 1074.v60e6c29b_b44b

Because the versions start with the character '1', jenkinsapi considers that the same as versions 1.x.y, and tries to use the legacy URL path. This is a quick fix to parse the version number on . and consider the whole first component.

dmanzoni commented 2 years ago

@chrisguidry lgtm when appending a [0] to the split('.')

chrisguidry commented 2 years ago

Thanks @dmanzoni! Good catch, I had trouble running the test suite locally, so I kind of made this change in the blind.