diff --git a/build/BUILD b/build/BUILD index 6966b707d3..c5657f7d00 100644 --- a/build/BUILD +++ b/build/BUILD @@ -89,12 +89,6 @@ grep ^STABLE_BUILD_SCM_REVISION bazel-out/stable-status.txt \ stamp = 1, ) -genrule( - name = "cni_package_version", - outs = ["cni_version"], - cmd = "echo 0.6.0 >$@", -) - release_filegroup( name = "docker-artifacts", srcs = [":%s.tar" % binary for binary in DOCKERIZED_BINARIES.keys()] + diff --git a/build/debs/BUILD b/build/debs/BUILD index 26e2cc7ca2..e1cbfecceb 100644 --- a/build/debs/BUILD +++ b/build/debs/BUILD @@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"]) load("@io_kubernetes_build//defs:deb.bzl", "k8s_deb", "deb_data") load("@io_kubernetes_build//defs:build.bzl", "release_filegroup") load("@io_kubernetes_build//defs:pkg.bzl", "pkg_tar") -load("//build:workspace.bzl", "CRI_TOOLS_VERSION") +load("//build:workspace.bzl", "CNI_VERSION", "CRI_TOOLS_VERSION") # We do not include kube-scheduler, kube-controller-manager, # kube-apiserver, and kube-proxy in this list even though we @@ -153,7 +153,7 @@ k8s_deb( "ethtool", "iproute2", "iptables (>= 1.4.21)", - "kubernetes-cni (>= 0.6.0)", + "kubernetes-cni (>= %s)" % CNI_VERSION, "mount", "socat", "util-linux", @@ -169,7 +169,7 @@ k8s_deb( depends = [ "kubelet (>= 1.8.0)", "kubectl (>= 1.8.0)", - "kubernetes-cni (>= 0.6.0)", + "kubernetes-cni (>= %s)" % CNI_VERSION, "cri-tools (>= 1.11.0)", ], description = """Kubernetes Cluster Bootstrapping Tool @@ -184,7 +184,7 @@ k8s_deb( description = """Kubernetes Packaging of CNI The Container Networking Interface tools for provisioning container networks. """, - version_file = "//build:cni_package_version", + version = CNI_VERSION, ) k8s_deb( diff --git a/build/root/WORKSPACE b/build/root/WORKSPACE index cee8962200..d8a6bfb737 100644 --- a/build/root/WORKSPACE +++ b/build/root/WORKSPACE @@ -1,6 +1,6 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("//build:workspace_mirror.bzl", "mirror") -load("//build:workspace.bzl", "CRI_TOOLS_VERSION") +load("//build:workspace.bzl", "CNI_VERSION", "CRI_TOOLS_VERSION") http_archive( name = "io_bazel_rules_go", @@ -58,7 +58,7 @@ http_file( name = "kubernetes_cni", downloaded_file_path = "kubernetes_cni.tgz", sha256 = "f04339a21b8edf76d415e7f17b620e63b8f37a76b2f706671587ab6464411f2d", - urls = mirror("https://storage.googleapis.com/kubernetes-release/network-plugins/cni-plugins-amd64-v0.6.0.tgz"), + urls = mirror("https://storage.googleapis.com/kubernetes-release/network-plugins/cni-plugins-amd64-v%s.tgz" % CNI_VERSION), ) http_file( diff --git a/build/rpms/BUILD b/build/rpms/BUILD index 8d6b928440..be011df488 100644 --- a/build/rpms/BUILD +++ b/build/rpms/BUILD @@ -1,7 +1,7 @@ package(default_visibility = ["//visibility:public"]) load("@bazel_tools//tools/build_defs/pkg:rpm.bzl", "pkg_rpm") -load("//build:workspace.bzl", "CRI_TOOLS_VERSION") +load("//build:workspace.bzl", "CNI_VERSION", "CRI_TOOLS_VERSION") filegroup( name = "rpms", @@ -66,7 +66,7 @@ pkg_rpm( ], spec_file = "kubernetes-cni.spec", tags = ["manual"], - version_file = "//build:cni_package_version", + version = CNI_VERSION, ) pkg_rpm( diff --git a/build/workspace.bzl b/build/workspace.bzl index 162839b645..edd2af76e7 100644 --- a/build/workspace.bzl +++ b/build/workspace.bzl @@ -13,3 +13,5 @@ # limitations under the License. CRI_TOOLS_VERSION = "1.12.0" + +CNI_VERSION = "0.6.0"