forked from Kong/kubernetes-ingress-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (44 loc) · 1.07 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
REGISTRY?=kong-docker-kubernetes-ingress-controller.bintray.io
TAG?=1.0.0
REPO_INFO=$(shell git config --get remote.origin.url)
IMGNAME?=kong-ingress-controller
IMAGE = $(REGISTRY)/$(IMGNAME)
# only for dev
DB?=false
RUN_VERSION?=20
ifndef COMMIT
COMMIT := $(shell git rev-parse --short HEAD)
endif
export GO111MODULE=on
.PHONY: test-all
test-all: lint test
.PHONY: test
test:
go test -race ./...
.PHONY: lint
lint:
golangci-lint run ./...
.PHONY: build
build:
CGO_ENABLED=0 go build -o kong-ingress-controller ./cli/ingress-controller
.PHONY: verify-manifests
verify-manifests:
./hack/verify-manifests.sh
.PHONY: verify-codegen
verify-codegen:
./hack/verify-codegen.sh
.PHONY: update-codegen
update-codegen:
./hack/update-codegen.sh
.PHONY: container
container:
docker build \
--build-arg TAG=${TAG} --build-arg COMMIT=${COMMIT} \
--build-arg REPO_INFO=${REPO_INFO} \
-t ${IMAGE}:${TAG} .
.PHONY: run
run:
./hack/dev/start.sh ${DB} ${RUN_VERSION}
.PHONY: integration-test
integration-test: container
KIC_IMAGE="${IMAGE}:${TAG}" ./test/integration/test.sh