use latest go-compile (#3906)

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2023-02-01 10:38:01 +02:00
committed by GitHub
parent 500fdb163b
commit c51ce2551e
5 changed files with 16 additions and 6 deletions

View File

@@ -4,13 +4,22 @@ RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb -p /out \
alpine-baselayout \
busybox \
curl \
git \
go \
musl-dev
# Hack to work around an issue wirh go on arm64 requiring gcc
# curl to install golangci-lint
RUN apk add --no-cache curl
# Hack to work around an issue with go on arm64 requiring gcc
RUN [ $(uname -m) = aarch64 ] && apk add --no-cache --initdb -p /out gcc || true
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
# installing golangci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /out/go/bin v1.50.1
FROM scratch
ENV GOPATH=/go PATH=$PATH:/go/bin
COPY --from=mirror /out/ /

View File

@@ -1 +1,2 @@
image: go-compile
network: true

View File

@@ -84,7 +84,7 @@ test -z $(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)
test -z $(GOOS=linux go vet $MOD_ARG -printf=false . 2>&1 | grep -v "^#" | grep -v vendor/ | tee /dev/stderr)
>&2 echo "golint..."
test -z $(find . -type f -name "*.go" -not -path "*/vendor/*" -not -name "*.pb.*" -exec golint {} \; | tee /dev/stderr)
test -z $(golangci-lint run ./... | tee /dev/stderr)
>&2 echo "ineffassign..."
test -z $(ineffassign ./... | tee /dev/stderr)