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) { ...@@ -122,8 +122,8 @@ func splitVersion(version string) (string, string, error) {
switch { switch {
case strings.HasPrefix(subs[0][2], "ci"): case strings.HasPrefix(subs[0][2], "ci"):
// Special case. CI images populated only by ci-cross area // Just use whichever the user specified
urlSuffix = "ci-cross" urlSuffix = subs[0][2]
default: default:
urlSuffix = "release" urlSuffix = "release"
} }
......
...@@ -180,8 +180,10 @@ func TestSplitVersion(t *testing.T) { ...@@ -180,8 +180,10 @@ func TestSplitVersion(t *testing.T) {
{"release/v1.7.0", "https://dl.k8s.io/release", "v1.7.0", true}, {"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}, {"release/latest-1.7", "https://dl.k8s.io/release", "latest-1.7", true},
// CI builds area, lookup actual builds at ci-cross/*.txt // 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-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 label in default (release) area: splitVersion validate only areas.
{"unknown-1", "https://dl.k8s.io/release", "unknown-1", true}, {"unknown-1", "https://dl.k8s.io/release", "unknown-1", true},
// unknown area, not valid input. // 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