-
Notifications
You must be signed in to change notification settings - Fork 202
/
Makefile
96 lines (76 loc) · 2.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
PROJECT_PATH=${PWD}
TARGETPLATFORM?=linux/amd64
GOOS?=linux
GOARCH?=amd64
GOLANGCI_LINT_VERSION=1.61.0
CHECK_COMMIT=5.0.4
.PHONY: test
test:
go test ./...
.PHONY: e2e
e2e:
go clean -testcache
go test ./... --tags=e2e_parallel,e2e_https
go test ./... -p 1 --tags=e2e_sequential
.PHONY: tidy
tidy:
go mod tidy
.PHONY: doc
doc:
cd documentation/gen/; go run .
.PHONY: lint
lint:
cd bin;GOLANGCI_LINT_VERSION=${GOLANGCI_LINT_VERSION} sh lint-check.sh
bin/golangci-lint run --timeout 20m --color always --max-issues-per-linter 0 --max-same-issues 0
.PHONY: lint-seq
lint-seq:
cd bin;GOLANGCI_LINT_VERSION=${GOLANGCI_LINT_VERSION} sh lint-check.sh
go run cmd/linters/*
.PHONY: check-commit
check-commit:
cd bin;CHECK_COMMIT=${CHECK_COMMIT} sh check-commit.sh
bin/check-commit
.PHONY: yaml-lint
yaml-lint:
docker run --rm -v $(pwd):/data cytopia/yamllint .
.PHONY: example
example:
deploy/tests/create.sh
.PHONY: example-pebble
example-pebble:
CUSTOMDOCKERFILE=build/Dockerfile.pebble deploy/tests/create.sh
## Install the `example` with an image built from a local build.
.PHONY: example-dev
example-dev: build-dev
CUSTOMDOCKERFILE=build/Dockerfile.dev deploy/tests/create.sh
.PHONY: example-experimental-gwapi
example-experimental-gwapi:
EXPERIMENTAL_GWAPI=1 deploy/tests/create.sh
.PHONY: example-rebuild
example-rebuild:
deploy/tests/rebuild.sh
.PHONY: example-remove
example-remove:
deploy/tests/delete.sh
.PHONY: build
build:
docker build -t haproxytech/kubernetes-ingress --build-arg TARGETPLATFORM=$(TARGETPLATFORM) -f build/Dockerfile .
.PHONY: build-pebble
build-pebble:
docker build -t haproxytech/kubernetes-ingress --build-arg TARGETPLATFORM=$(TARGETPLATFORM) -f build/Dockerfile.pebble .
### build-dev builds locally an ingress-controller binary and copies it into the docker image.
### Can be used for example to use `go replace` and build with a local library,
.PHONY: build-dev
build-dev:
GOOS=$(GOSS) GOARCH=$(GOARCH) go build .
docker build -t haproxytech/kubernetes-ingress --build-arg TARGETPLATFORM=$(TARGETPLATFORM) -f build/Dockerfile.dev .
.PHONY: publish
publish:
goreleaser release --rm-dist
.PHONY: cr_generate
cr_generate:
crs/code-generator.sh
.PHONY: gofumpt
gofumpt:
go install mvdan.cc/gofumpt@latest
gofumpt -l -w .