Commit 9621f7e8 authored by Davanum Srinivas's avatar Davanum Srinivas

Improve where we load builds from for kubeadm upgrade jobs

We should stop special casing "ci-cross" and just use the configuration in test-infra to dictate where we pick up the builds from. For 1.8,1.9,1.10 branches, we need to load the latest version from ci/latest*.txt. For master, 1.11 etc, we need to load from ci-cross/latest*.txt. We need to update test-infra configs if things fail. try these to verify: ``` gsutil cat gs://kubernetes-release-dev/ci/latest-1.9.txt gsutil cat gs://kubernetes-release-dev/ci-cross/latest.txt ```
parent aac68427
......@@ -122,8 +122,8 @@ func splitVersion(version string) (string, string, error) {
switch {
case strings.HasPrefix(subs[0][2], "ci"):
// Special case. CI images populated only by ci-cross area
urlSuffix = "ci-cross"
// Just use whichever the user specified
urlSuffix = subs[0][2]
default:
urlSuffix = "release"
}
......
......@@ -180,8 +180,10 @@ func TestSplitVersion(t *testing.T) {
{"release/v1.7.0", "https://dl.k8s.io/release", "v1.7.0", true},
{"release/latest-1.7", "https://dl.k8s.io/release", "latest-1.7", true},
// CI builds area, lookup actual builds at ci-cross/*.txt
{"ci/latest", "https://dl.k8s.io/ci", "latest", true},
{"ci-cross/latest", "https://dl.k8s.io/ci-cross", "latest", true},
{"ci/latest-1.7", "https://dl.k8s.io/ci-cross", "latest-1.7", true},
{"ci/latest-1.7", "https://dl.k8s.io/ci", "latest-1.7", true},
{"ci-cross/latest-1.7", "https://dl.k8s.io/ci-cross", "latest-1.7", true},
// unknown label in default (release) area: splitVersion validate only areas.
{"unknown-1", "https://dl.k8s.io/release", "unknown-1", true},
// unknown area, not valid input.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment