Skip to content

Commit

Permalink
Merge pull request #2103 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2101-to-release-1.1

[release-1.1] don’t check pre-release versions against known capz images
  • Loading branch information
k8s-ci-robot authored Feb 17, 2022
2 parents cf51d99 + 1334267 commit 7a24a4b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,10 @@ func getLatestSkuForMinor(version string, skus semver.Versions) string {
}
}
} else if v, err := semver.ParseTolerant(version); err == nil {
// if the version is in the format "v1.21.2", we make sure we have an existing image for it.
Expect(skus).To(ContainElement(v), fmt.Sprintf("Provided Kubernetes version %s does not have a corresponding VM image in the capi offer", version))
if len(v.Pre) == 0 {
// if the version is in the format "v1.21.2", we make sure we have an existing image for it.
Expect(skus).To(ContainElement(v), fmt.Sprintf("Provided Kubernetes version %s does not have a corresponding VM image in the capi offer", version))
}
}
// otherwise, we just return the version as-is. This allows for versions in other formats, such as "latest" or "latest-1.21".
return version
Expand Down

0 comments on commit 7a24a4b

Please sign in to comment.