Unverified Commit 39efd9e8 authored by Leo Ryu's avatar Leo Ryu Committed by GitHub
Browse files

feat(platform): update code generator (#1648)

Showing with 14 additions and 14 deletions
+14 -14
......@@ -14,7 +14,7 @@
# WARRANTIES OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
FROM golang:1.15-alpine
FROM golang:1.16.9-alpine
RUN apk add --update --no-cache autoconf automake libtool zlib-dev build-base curl git
......@@ -23,35 +23,35 @@ ENV PROTOBUF_VERSION 3.11.4
ENV PROTOBUF_URL=https://github.com/protocolbuffers/protobuf/archive/v${PROTOBUF_VERSION}.tar.gz
RUN curl -L ${PROTOBUF_URL} -o - | tar -xz -C /tmp
RUN cd /tmp/protobuf-* && \
./autogen.sh && \
./configure --disable-shared --enable-static && \
make --silent -j `nproc` install-strip
./autogen.sh && \
./configure --disable-shared --enable-static && \
make --silent -j `nproc` install-strip
RUN cd /tmp && rm -rf protobuf-$PROTOBUF_VERSION \
&& protoc --version
&& protoc --version
ENV GOPATH=/go
ENV GO111MODULE=off
# Clone the kubernetes
ENV KUBERNETES_VERSION 1.19.7
ENV KUBERNETES_VERSION 1.22.3
RUN mkdir -p $GOPATH/src/k8s.io \
&& git clone -b v$KUBERNETES_VERSION --single-branch https://github.com/kubernetes/kubernetes.git $GOPATH/src/k8s.io/kubernetes
&& git clone -b v$KUBERNETES_VERSION --single-branch https://github.com/kubernetes/kubernetes.git $GOPATH/src/k8s.io/kubernetes
RUN apk add --update --no-cache rsync file patch
RUN cd $GOPATH/src/k8s.io/kubernetes \
&& make WHAT="cmd/genswaggertypedocs vendor/k8s.io/code-generator/cmd/defaulter-gen vendor/k8s.io/code-generator/cmd/client-gen vendor/k8s.io/code-generator/cmd/lister-gen vendor/k8s.io/code-generator/cmd/informer-gen vendor/k8s.io/code-generator/cmd/deepcopy-gen vendor/k8s.io/code-generator/cmd/conversion-gen vendor/k8s.io/code-generator/cmd/go-to-protobuf vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo"
&& make WHAT="cmd/genswaggertypedocs vendor/k8s.io/code-generator/cmd/defaulter-gen vendor/k8s.io/code-generator/cmd/client-gen vendor/k8s.io/code-generator/cmd/lister-gen vendor/k8s.io/code-generator/cmd/informer-gen vendor/k8s.io/code-generator/cmd/deepcopy-gen vendor/k8s.io/code-generator/cmd/conversion-gen vendor/k8s.io/code-generator/cmd/go-to-protobuf vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo"
RUN ln -s $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery $GOPATH/src/k8s.io/apimachinery \
&& ln -s $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/api $GOPATH/src/k8s.io/api
&& ln -s $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/api $GOPATH/src/k8s.io/api
# work around 64MB tmpfs size in Docker 1.6
ENV TMPDIR /tmp.k8s
RUN mkdir $TMPDIR \
&& chmod a+rwx $TMPDIR \
&& chmod o+t $TMPDIR
&& chmod a+rwx $TMPDIR \
&& chmod o+t $TMPDIR
# Get the code coverage tool and goimports
RUN go get golang.org/x/tools/cmd/cover \
golang.org/x/tools/cmd/goimports \
&& go clean -cache
golang.org/x/tools/cmd/goimports \
&& go clean -cache
WORKDIR "$GOPATH/src/k8s.io/kubernetes"
ADD code.sh /root/
......
......@@ -14,7 +14,7 @@
# WARRANTIES OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
VERSION = v1.19.7
VERSION = v1.22.3
REGISTRY_PREFIX ?= tkestack
IMAGE_NAME ?= code-generator
......
Supports Markdown
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