hack/versions: extract most from vendor.conf
This sets `$what_VERSION` and `$what_REPO` for runc, cni, containerd and kubernetes based on vendor.conf, removing the need to duplicate things in hack/versions. With this `update_hack_versions` becomes redundant so remove it and both calls. Since CONTAINERD_REPO is now unconditionally set we can also simplify the fetching of vendor.conf in update-vendor.sh a bit, so do so. Further since `*_REPO` are now unconditionally set we can support alternative clone paths for all of these repos by adjusting checkout_repo to make the 3rd argument non-optional and always passing it. Since `CRITOOL_VERSION` is not coming from `vendor.conf` (since it is not used from Go code) we manually set `CRITOOL_REPO` for consistency. The final wrinkle is that `k8s.io/kubernetes` is has a Go specific redirect in the form of HTML meta headers returned from https://k8s.io/kubernetes/?go-get=1 which point to the real repo to clone. Parsing that in shell is tricky so just hardcode that. Fixes #540. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
RUNC_VERSION=9f9c96235cc97674e935002fc3d78361b696a69e
|
||||
CNI_VERSION=v0.6.0
|
||||
CONTAINERD_VERSION=f12ba2407e328c98f8be5eacbb9c510b073dd4c0
|
||||
CONTAINERD_REPO=
|
||||
from-vendor RUNC github.com/opencontainers/runc
|
||||
from-vendor CNI github.com/containernetworking/plugins
|
||||
from-vendor CONTAINERD github.com/containerd/containerd
|
||||
from-vendor KUBERNETES k8s.io/kubernetes
|
||||
|
||||
# k8s.io is actually a redirect, but we do not handle the go-import
|
||||
# metadata which `go get` and `vndr` etc do. Handle it manually here.
|
||||
if [ x"$KUBERNETES_REPO" = "xk8s.io" ] ; then
|
||||
KUBERNETES_REPO="https://github.com/kubernetes/kubernetes"
|
||||
fi
|
||||
|
||||
# Not from vendor.conf.
|
||||
CRITOOL_VERSION=240a840375cdabb5860c75c99e8b0d0a776006b4
|
||||
KUBERNETES_VERSION=0caa20c65f147e15f5545862510eb7e81c42b0a3
|
||||
CRITOOL_REPO=github.com/kubernetes-incubator/cri-tools
|
||||
|
||||
Reference in New Issue
Block a user