mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
helm: Accept release candidate versions for compatibility checks (#745)
SUMMARY If the helm CLI version includes -rc.1 for example, the version checks fails due to an incomplete regex. The error can be triggered if you use helm v3.15.0-rc.1 for example, and apply a helm chart with wait: true ISSUE TYPE Bugfix Pull Request COMPONENT NAME helm helm_pull ADDITIONAL INFORMATION Reviewed-by: Yuriy Novostavskiy Reviewed-by: Eric G. Reviewed-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
@@ -184,10 +184,10 @@ class AnsibleHelmModule(object):
|
||||
def get_helm_version(self):
|
||||
command = self.get_helm_binary() + " version"
|
||||
rc, out, err = self.run_command(command)
|
||||
m = re.match(r'version.BuildInfo{Version:"v([0-9\.]*)",', out)
|
||||
m = re.match(r'version.BuildInfo{Version:"v(.*?)",', out)
|
||||
if m:
|
||||
return m.group(1)
|
||||
m = re.match(r'Client: &version.Version{SemVer:"v([0-9\.]*)", ', out)
|
||||
m = re.match(r'Client: &version.Version{SemVer:"v(.*?)", ', out)
|
||||
if m:
|
||||
return m.group(1)
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user