-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
39 lines (29 loc) · 1.09 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
NAME=ducklett
TAG?=local-0.1.8
ENVVAR=CGO_ENABLED=0
GOOS?=linux
GOARCH?=$(shell go env GOARCH)
IMAGE?=gitlab.com/tmobile/conducktor/infrastructure/$(NAME)
TEST_UTILITY_NAME=update-azure-image-tags
build:
$(ENVVAR) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(NAME)
build-test-utility:
$(ENVVAR) GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(TEST_UTILITY_NAME) test-utility/cmd/main.go
push-image-kind:
kind load docker-image ${IMAGE}:${TAG}
clean:
rm -f $(NAME)
format:
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -s -d {} + | tee /dev/stderr)" || \
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -s -w {} + | tee /dev/stderr)"
docker-build:
docker build -t ${IMAGE}:${TAG} -f Dockerfile.local --build-arg RELEASE_VERSION=$(TAG) --build-arg RELEASE_NAME=$(NAME) .
containerize:
docker build -t ${IMAGE}:${TAG} .
validate:
go fmt && \
go vet && \
go test -race
test:
go test -race
.PHONY: all build test-unit clean format execute-release dev-release docker-builder build-in-docker release generate push-image push-manifest