-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (31 loc) · 847 Bytes
/
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
VERSION ?= 0.0.1
#VERSION ?= $(git rev-parse --short HEAD)
IMAGE_TAG_BASE ?= quay.io/massigollo/benchy
PLATFORMS ?= linux/amd64
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
COMMAND ?= simple
.PHONY: test
test:
@go test -v ./...
.PHONY: run
run:
@go build -o bin/benchy main.go
@./bin/benchy ${COMMAND}
.PHONY: build
build: test
@docker buildx build --platform=${PLATFORMS} --tag ${IMG} .
.PHONY: push
push: build
@docker push ${IMG}
.PHONY: build-load
build-load:
@docker build -t $(IMAGE_TAG_BASE):locust-${VERSION} tools/load-gen
.PHONY: push-load
push-load: build-load
@docker push $(IMAGE_TAG_BASE):locust-${VERSION}
deploy:
@kubectl cluster-info | head -n -2
@echo "Current ns: $$(kubectl config get-contexts | grep -e "^\*" | awk '{print $$5}')"
@kubectl apply -f release/kubernetes
destroy:
kubectl delete -f release/kubernetes