-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (27 loc) · 825 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
BINARY_NAME=api
test:
@echo "Installing tparse (if needed)..."
@go install github.com/mfridman/[email protected]
@echo "Running unit tests..."
@go test ./... -cover -json | tparse
build:
@echo "Building binary..."
@go build -o bin/$(BINARY_NAME)
@echo "Done!"
run: build
@echo "Running binary..."
@./bin/$(BINARY_NAME)
# Temporary deployment scripts that will be replaced by a CI/CD pipeline
build_docker:
@echo "Building docker image..."
@docker build -t webstradev/rsdb-backend:latest .
@echo "Pushing docker image..."
@docker push webstradev/rsdb-backend:latest
deploy-dev:
@echo "Deleting old k8s deployment"
-@kubectl delete deployment rsdb-dev-backend -n rsdb
@echo "Deploying new k8s deployment"
@kubectl apply -f kube/dev-deployment.yaml
@echo "Done!"
dev: build_docker deploy-dev
@echo "Done!"