From: Alexandru Avadanii Date: Fri, 24 Apr 2020 14:49:52 +0000 (+0200) Subject: k8s conformance: Sanitize major/minor version str X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=528222a0d0fff5208e298548a567f3a63ef4358a;p=validation.git k8s conformance: Sanitize major/minor version str 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 --- diff --git a/tests/k8s/conformance/conformance.robot b/tests/k8s/conformance/conformance.robot index edd2271..c51f217 100644 --- a/tests/k8s/conformance/conformance.robot +++ b/tests/k8s/conformance/conformance.robot @@ -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