Skip to content

Commit

Permalink
Merge pull request #358 from droot/use-k8s-1.11
Browse files Browse the repository at this point in the history
Thirdparty tools to use k8s 1.11
  • Loading branch information
k8s-ci-robot authored Aug 15, 2018
2 parents a20e82a + 3492ba5 commit 1cdcd87
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build/cloudbuild_tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

steps:
- name: "gcr.io/kubebuilder/thirdparty-${_GOOS}:1.10.1"
- name: "gcr.io/kubebuilder/thirdparty-${_GOOS}:1.11.0"
args: ["cp", "/kubebuilder_${_GOOS}_${_GOARCH}.tar.gz", "/workspace/kubebuilder-${TAG_NAME}-${_GOOS}-${_GOARCH}.tar.gz"]
env:
- 'GOOS=${_GOOS}'
Expand Down
16 changes: 8 additions & 8 deletions build/thirdparty/darwin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
# - reference-docs

# Build k8s.io/kubernetes binaries
FROM golang:1.10-stretch as kubernetes-darwin
FROM golang:1.10.2-stretch as kubernetes-darwin
# Install tools
RUN apt update
RUN apt install rsync -y
RUN go get github.com/jteeuwen/go-bindata/go-bindata
ENV CGO 0
ENV DEST /usr/local/kubebuilder/bin/
RUN mkdir -p $DEST || echo ""
RUN git clone https://github.com/kubernetes/kubernetes $GOPATH/src/k8s.io/kubernetes --depth=1 -b release-1.10
RUN git clone https://github.com/kubernetes/kubernetes $GOPATH/src/k8s.io/kubernetes --depth=1 -b release-1.11
WORKDIR /go/src/k8s.io/kubernetes

# Build for linux first otherwise it won't work for darwin - :(
Expand All @@ -52,7 +52,7 @@ RUN make WHAT=cmd/kubectl
RUN cp _output/local/bin/$KUBE_BUILD_PLATFORMS/kubectl $DEST

# Build coreos/etcd binaries
FROM golang:1.10-stretch as etcd-darwin
FROM golang:1.10.2-stretch as etcd-darwin
ENV CGO 0
ENV GOOS darwin
ENV GOARCH amd64
Expand All @@ -62,13 +62,13 @@ RUN git clone https://github.com/coreos/etcd $GOPATH/src/github.com/coreos/etcd
RUN go build -o $DEST/etcd github.com/coreos/etcd

# Build k8s.io/code-generator binaries
FROM golang:1.10-stretch as code-generator-darwin
FROM golang:1.10.2-stretch as code-generator-darwin
ENV CGO 0
ENV GOOS darwin
ENV GOARCH amd64
ENV DEST /usr/local/kubebuilder/bin/
RUN mkdir -p $DEST || echo ""
RUN git clone https://github.com/kubernetes/code-generator $GOPATH/src/k8s.io/code-generator --depth=1 -b release-1.10
RUN git clone https://github.com/kubernetes/code-generator $GOPATH/src/k8s.io/code-generator --depth=1 -b release-1.11
RUN go build -o $DEST/client-gen k8s.io/code-generator/cmd/client-gen
RUN go build -o $DEST/conversion-gen k8s.io/code-generator/cmd/conversion-gen
RUN go build -o $DEST/deepcopy-gen k8s.io/code-generator/cmd/deepcopy-gen
Expand All @@ -79,7 +79,7 @@ RUN go build -o $DEST/openapi-gen k8s.io/code-generator/cmd/openapi-gen

# Build kubernetes-incubator/reference-docs binaries

FROM golang:1.10-stretch as reference-docs-darwin
FROM golang:1.10.2-stretch as reference-docs-darwin
ENV CGO 0
ENV GOOS darwin
ENV GOARCH amd64
Expand All @@ -89,7 +89,7 @@ RUN git clone https://github.com/kubernetes-incubator/reference-docs $GOPATH/src
RUN go build -o $DEST/gen-apidocs github.com/kubernetes-incubator/reference-docs/gen-apidocs

# Copy all binaries into a single tar.gz file
FROM golang:1.10-stretch as darwin
FROM golang:1.10.2-stretch as darwin
RUN mkdir -p /usr/local/kubebuilder/bin/
COPY --from=etcd-darwin /usr/local/kubebuilder/bin/* /usr/local/kubebuilder/bin/
COPY --from=kubernetes-darwin /usr/local/kubebuilder/bin/* /usr/local/kubebuilder/bin/
Expand All @@ -100,4 +100,4 @@ RUN tar -czvf /kubebuilder_darwin_amd64.tar.gz kubebuilder/

# Host the tar.gz file in a thin image
FROM alpine:3.7
COPY --from=darwin /kubebuilder_darwin_amd64.tar.gz /kubebuilder_darwin_amd64.tar.gz
COPY --from=darwin /kubebuilder_darwin_amd64.tar.gz /kubebuilder_darwin_amd64.tar.gz
16 changes: 8 additions & 8 deletions build/thirdparty/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
# - *-gen code generators
# - reference-docs

FROM golang:1.10-stretch as kubernetes-linux
FROM golang:1.10.2-stretch as kubernetes-linux
# Install tools
RUN apt update
RUN apt install rsync -y
RUN go get github.com/jteeuwen/go-bindata/go-bindata
ENV CGO 0
ENV DEST /usr/local/kubebuilder/bin/
RUN mkdir -p $DEST || echo ""
RUN git clone https://github.com/kubernetes/kubernetes $GOPATH/src/k8s.io/kubernetes --depth=1 -b release-1.10
RUN git clone https://github.com/kubernetes/kubernetes $GOPATH/src/k8s.io/kubernetes --depth=1 -b release-1.11
WORKDIR /go/src/k8s.io/kubernetes
ENV KUBE_BUILD_PLATFORMS linux/amd64
RUN make WHAT=cmd/kube-apiserver
Expand All @@ -38,7 +38,7 @@ RUN cp _output/local/bin/$KUBE_BUILD_PLATFORMS/kube-apiserver $DEST
RUN cp _output/local/bin/$KUBE_BUILD_PLATFORMS/kube-controller-manager $DEST
RUN cp _output/local/bin/$KUBE_BUILD_PLATFORMS/kubectl $DEST

FROM golang:1.10-stretch as etcd-linux
FROM golang:1.10.2-stretch as etcd-linux
ENV CGO 0
ENV GOOS linux
ENV GOARCH amd64
Expand All @@ -47,13 +47,13 @@ RUN mkdir -p $DEST || echo ""
RUN git clone https://github.com/coreos/etcd $GOPATH/src/github.com/coreos/etcd --depth=1
RUN go build -o $DEST/etcd github.com/coreos/etcd

FROM golang:1.10-stretch as code-generator-linux
FROM golang:1.10.2-stretch as code-generator-linux
ENV CGO 0
ENV GOOS linux
ENV GOARCH amd64
ENV DEST /usr/local/kubebuilder/bin/
RUN mkdir -p $DEST || echo ""
RUN git clone https://github.com/kubernetes/code-generator $GOPATH/src/k8s.io/code-generator --depth=1 -b release-1.10
RUN git clone https://github.com/kubernetes/code-generator $GOPATH/src/k8s.io/code-generator --depth=1 -b release-1.11
RUN go build -o $DEST/client-gen k8s.io/code-generator/cmd/client-gen
RUN go build -o $DEST/conversion-gen k8s.io/code-generator/cmd/conversion-gen
RUN go build -o $DEST/deepcopy-gen k8s.io/code-generator/cmd/deepcopy-gen
Expand All @@ -62,7 +62,7 @@ RUN go build -o $DEST/informer-gen k8s.io/code-generator/cmd/informer-gen
RUN go build -o $DEST/lister-gen k8s.io/code-generator/cmd/lister-gen
RUN go build -o $DEST/openapi-gen k8s.io/code-generator/cmd/openapi-gen

FROM golang:1.10-stretch as reference-docs-linux
FROM golang:1.10.2-stretch as reference-docs-linux
ENV CGO 0
ENV GOOS linux
ENV GOARCH amd64
Expand All @@ -71,7 +71,7 @@ RUN mkdir -p $DEST || echo ""
RUN git clone https://github.com/kubernetes-incubator/reference-docs $GOPATH/src/github.com/kubernetes-incubator/reference-docs --branch kubebuilder --depth=1
RUN go build -o $DEST/gen-apidocs github.com/kubernetes-incubator/reference-docs/gen-apidocs

FROM golang:1.10-stretch as linux
FROM golang:1.10.2-stretch as linux
RUN mkdir -p /usr/local/kubebuilder/bin/
COPY --from=etcd-linux /usr/local/kubebuilder/bin/* /usr/local/kubebuilder/bin/
COPY --from=kubernetes-linux /usr/local/kubebuilder/bin/* /usr/local/kubebuilder/bin/
Expand All @@ -81,4 +81,4 @@ WORKDIR /usr/local
RUN tar -czvf /kubebuilder_linux_amd64.tar.gz kubebuilder/

FROM alpine:3.7
COPY --from=linux /kubebuilder_linux_amd64.tar.gz /kubebuilder_linux_amd64.tar.gz
COPY --from=linux /kubebuilder_linux_amd64.tar.gz /kubebuilder_linux_amd64.tar.gz

0 comments on commit 1cdcd87

Please sign in to comment.