Skip to content

Commit 80a9820

Browse files
committed
cleanup build
Signed-off-by: Markus Blaschke <[email protected]>
1 parent 684f108 commit 80a9820

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@ FROM golang:1.17 as build
22

33
WORKDIR /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
126
COPY ./ /go/src/github.com/webdevops/kube-pool-manager
7+
RUN make dependencies
138
RUN make test
149
RUN make build
1510
RUN ./kube-pool-manager --help

Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,20 @@ build-push-development:
3434
test:
3535
go test ./...
3636

37+
.PHONY: dependencies
38+
dependencies:
39+
go mod vendor
40+
3741
.PHONY: lint
3842
lint: $(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

0 commit comments

Comments
 (0)