Run lint as part of the docker build.
This commit is contained in:
parent
8e842a3fc2
commit
c84c574928
3 changed files with 6 additions and 2 deletions
|
@ -8,4 +8,4 @@ go get golang.org/x/lint/golint
|
||||||
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
|
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
|
||||||
go get github.com/fzipp/gocyclo/cmd/gocyclo
|
go get github.com/fzipp/gocyclo/cmd/gocyclo
|
||||||
|
|
||||||
./scripts/lint.sh
|
/bin/sh ./scripts/lint.sh
|
||||||
|
|
|
@ -7,7 +7,11 @@ COPY go.mod .
|
||||||
COPY go.sum .
|
COPY go.sum .
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN CGO_ENABLED=0 sh .buildkite/lint.sh
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o rageshake
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o rageshake
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# check the go source for lint. This is run by CI, and the pre-commit hook.
|
# check the go source for lint. This is run by CI, and the pre-commit hook.
|
||||||
|
|
||||||
|
|
Reference in a new issue