1
0
mirror of https://github.com/rancher/types.git synced 2025-04-27 02:10:48 +00:00

Update to go 1.13

This commit is contained in:
Darren Shepherd 2020-03-26 13:29:18 -07:00
parent 438c299ece
commit 19b8e21bfa
2 changed files with 14 additions and 8 deletions

View File

@ -1,16 +1,23 @@
FROM golang:1.11-alpine
FROM golang:1.13.9-alpine3.10
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
RUN apk -U add bash git gcc musl-dev docker vim less file curl wget ca-certificates
RUN go get -d golang.org/x/lint/golint && \
git -C /go/src/golang.org/x/lint/golint checkout -b current 06c8688daad7faa9da5a0c2f163a3d14aac986ca && \
go install golang.org/x/lint/golint && \
rm -rf /go/src /go/pkg
# This install needs to be kept up to date with rancher/rancher
RUN go get -d golang.org/x/tools/cmd/goimports && \
git -C /go/src/golang.org/x/tools/cmd/goimports checkout -b release-branch.go1.12 origin/release-branch.go1.12 && \
go install golang.org/x/tools/cmd/goimports && \
rm -rf /go/src /go/pkg
RUN mkdir -p /go/src/golang.org/x && \
cd /go/src/golang.org/x && git clone https://github.com/golang/tools && \
git -C /go/src/golang.org/x/tools checkout -b current aa82965741a9fecd12b026fbb3d3c6ed3231b8f8 && \
go install golang.org/x/tools/cmd/goimports
RUN rm -rf /go/src /go/pkg
RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.15.0; \
fi
ENV GO111MODULE off
ENV DAPPER_ENV REPO TAG DRONE_TAG
ENV DAPPER_SOURCE /go/src/github.com/rancher/types/
ENV DAPPER_OUTPUT ./bin ./dist

View File

@ -7,8 +7,7 @@ echo Running tests
PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"
[ "${ARCH}" == "amd64" ] && RACE=-race
go test ${RACE} -cover -tags=test ${PACKAGES}
go test -cover -tags=test ${PACKAGES}
go generate
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then