k8s conformance: Sanitize major/minor version str 87/3387/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 24 Apr 2020 14:49:52 +0000 (16:49 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 24 Apr 2020 14:58:27 +0000 (16:58 +0200)
Since we use `kubectl version` to determine K8s client/server version
strings, the major/minor semver components might include some custom
suffixes, e.g. '1.13+abcdef' would be split into '1' and '13+abcdef'.
Avoid including the custom semver suffixes into the kube-conformance
image tag name by sanitizating the major/minor version strings.

JIRA: VAL-111

Change-Id: Iac4f719e4e982b90b50a23e5bcaeff4bda9fe104
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
tests/k8s/conformance/conformance.robot

index edd2271..c51f217 100644 (file)
@@ -148,6 +148,8 @@ Define Images
         ${versions}=            Convert String To JSON  ${result.stdout}
         ${major}=               Get Value From Json  ${versions}  $.serverVersion.major
         ${minor}=               Get Value From Json  ${versions}  $.serverVersion.minor
+        ${major}=               Get Regexp Matches  ${major[0]}  \\d+
+        ${minor}=               Get Regexp Matches  ${minor[0]}  \\d+
         Set To Dictionary       ${SONOBUOY_IMGS['e2e']}  name=validation:kube-conformance-v${major[0]}.${minor[0]}
 
 Onboard Images