@@ -21,52 +21,17 @@ function init {
21
21
export GOROOT=$ROOT_DIR /golang
22
22
}
23
23
24
- function build_kube_cross {
25
- cd $ROOT_DIR /k8s.io/release
26
- # Note that you can't really move the tool itself around since it has
27
- # references to binaries that live relative to its GOROOT.
28
- # This is solved by copying the whole GOROOT directory below.
29
- cp -r $GOROOT $ROOT_DIR /k8s.io/release/images/build/cross
30
-
31
- cd $ROOT_DIR /k8s.io/release/images/build/cross
32
-
33
- # Modify Dockerfile to use previously built custom version of Go.
34
- # The following assumes that $GOROOT was moved to Dockerfile directory.
35
- sed -i ' s#FROM .*$#FROM buildpack-deps:bullseye-scm\
36
- \
37
- COPY golang /usr/local/go\
38
- RUN chmod -R a+rx /usr/local/go\
39
- \
40
- RUN export PATH="/usr/local/go/bin:$PATH"; go version\
41
- \
42
- ENV GOPATH /go\
43
- ENV PATH $GOPATH\/bin:/usr/local/go/bin:$PATH\
44
- \
45
- RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" \&\& chmod -R 777 "$GOPATH"\
46
- WORKDIR $GOPATH#' default/Dockerfile
47
-
48
- make container REGISTRY=gcr.io/k8s-testimages PLATFORMS=linux/amd64 GO_MAJOR_VERSION=-master OS_CODENAME=debian
49
-
50
- # The make command above changes the docker buildx builder from default
51
- # to a custom one that uses "docker-container" driver (instead of "docker").
52
- # This driver forces pulling images instead of looking for them in the
53
- # local cache as a primary attempt. As we do not want to use any additional
54
- # container registry, we set the builder back to default.
55
- docker buildx use default
56
- }
57
-
58
24
function build_kubernetes {
59
25
cd $ROOT_DIR /k8s.io/kubernetes
60
26
27
+ # Ensure we build against latest golang version.
28
+ echo -n " devel" > .go-version
29
+
61
30
# Build Kubernetes using our kube-cross image.
62
31
# Also pass GOTOOLCHAIN=local to make sure kube-build
63
32
# uses the golang version built locally in build-go.sh.
64
- make quick-release \
65
- GOTOOLCHAIN=local \
66
- KUBE_CROSS_IMAGE=gcr.io/k8s-testimages/kube-cross-amd64 \
67
- KUBE_CROSS_VERSION=latest-go-master-debian-default
33
+ make quick-release
68
34
}
69
35
70
36
init
71
- build_kube_cross
72
37
build_kubernetes
0 commit comments