File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,9 @@ FROM golang:1.17 as build
22
33WORKDIR /go/src/github.com/webdevops/kube-pool-manager
44
5- # Get deps (cached)
6- COPY ./go.mod /go/src/github.com/webdevops/kube-pool-manager
7- COPY ./go.sum /go/src/github.com/webdevops/kube-pool-manager
8- COPY ./Makefile /go/src/github.com/webdevops/kube-pool-manager
9- RUN make dependencies
10-
115# Compile
126COPY ./ /go/src/github.com/webdevops/kube-pool-manager
7+ RUN make dependencies
138RUN make test
149RUN make build
1510RUN ./kube-pool-manager --help
Original file line number Diff line number Diff line change @@ -34,12 +34,20 @@ build-push-development:
3434test :
3535 go test ./...
3636
37+ .PHONY : dependencies
38+ dependencies :
39+ go mod vendor
40+
3741.PHONY : lint
3842lint : $(GOLANGCI_LINT_BIN )
39- $(GOLANGCI_LINT_BIN ) run -E exportloopref,gofmt --timeout=10m
43+ $(GOLANGCI_LINT_BIN ) run -E exportloopref,gofmt --timeout=25m
4044
41- .PHONY : dependencies
42- dependencies : $(GOLANGCI_LINT_BIN )
45+ .PHONY : gosec
46+ gosec : $(GOSEC_BIN )
47+ $(GOSEC_BIN ) ./...
4348
4449$(GOLANGCI_LINT_BIN ) :
45- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(FIRST_GOPATH ) /bin v1.32.2
50+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH ) /bin
51+
52+ $(GOSEC_BIN ) :
53+ curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(FIRST_GOPATH ) /bin v2.7.0
You can’t perform that action at this time.
0 commit comments