-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 1.02 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
REPO ?= quay.io/epic-gateway
PREFIX ?= eds-server
SUFFIX = ${USER}-dev
TAG ?= ${REPO}/${PREFIX}:${SUFFIX}
##@ Default Goal
.PHONY: help
help: ## Display this help
@echo "Usage:"
@echo " make <goal> [VAR=value ...]"
@echo
@echo "Variables"
@echo " REPO The registry part of the Docker tag"
@echo " PREFIX Docker tag prefix (useful to set the docker registry)"
@echo " SUFFIX Docker tag suffix (the part after ':')"
@awk 'BEGIN {FS = ":.*##"}; \
/^[a-zA-Z0-9_-]+:.*?##/ { printf " %-15s %s\n", $$1, $$2 } \
/^##@/ { printf "\n%s\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
##@ Development Goals
.PHONY: test
test: ## Run some code quality checks
go vet ./...
go test -race -short ./...
run: ## Run the service using "go run" (KUBECONFIG needs to be set)
go run ./main.go --debug
image-build: ## Build the container image
docker build --tag=${TAG} .
image-push: image ## Push the image to the repo
docker push ${TAG}
image-run: image ## Run the service using "docker run"
docker run --rm --publish=18000:18000 ${TAG}