add version api (#2127)

add cluster validation api
This commit is contained in:
zryfish
2020-05-27 18:11:27 +08:00
committed by GitHub
parent e119fd8a36
commit 27ca024bb7
11 changed files with 308 additions and 14 deletions

View File

@@ -7,7 +7,15 @@ FROM golang:1.12 as ks-apiserver-builder
COPY / /go/src/kubesphere.io/kubesphere
WORKDIR /go/src/kubesphere.io/kubesphere
RUN CGO_ENABLED=0 GO111MODULE=on GOOS=linux GOARCH=amd64 GOFLAGS=-mod=vendor go build -i -ldflags '-w -s' -o ks-apiserver cmd/ks-apiserver/apiserver.go
RUN GIT_VERSION=$(git describe --always --dirty) && \
GIT_HASH=$(git rev-parse HEAD) && \
BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \
CGO_ENABLED=0 GO111MODULE=on GOOS=linux GOARCH=amd64 GOFLAGS=-mod=vendor \
go build -i -ldflags \
'-w -s -X kubesphere.io/kubesphere/pkg/version.version=$(GIT_VERSION) \
-X kubesphere.io/kubesphere/pkg/version.gitCommit=$(GIT_HASH) \
-X kubesphere.io/kubesphere/pkg/version.buildDate=$(BUILDDATE)' \
-o ks-apiserver cmd/ks-apiserver/apiserver.go
FROM alpine:3.9
RUN apk add --update ca-certificates && update-ca-certificates