-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (31 loc) · 1.04 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
# File: Makefile
.PHONY: build test docker-build docker-push deploy
build:
go build -o rest-ingestion-service ./cmd/rest-ingestion-service
lint:
golangci-lint run
test:
./run_tests.sh
docker-build:
docker build -t your-registry/rest-ingestion-service:latest -f deployments/Dockerfile .
docker-push:
docker push your-registry/rest-ingestion-service:latest
deploy:
kubectl apply -f deployments/kubernetes/deployment.yaml
kubectl apply -f deployments/kubernetes/service.yaml
setup-pre-commit:
./scripts/setup_pre_commit.sh
# Targets with skip options
test-skip:
@echo "skiping tests"
lint-skip:
@echo "skiping linting"
build-skip:
docker build -t rest-ingestion-service:latest -f deployments/Dockerfile . --no-cache
deploy-skip:
kubectl apply -f deployments/kubernetes/deployment.yaml --force
# CI target that runs all checks
ci: lint test build
# CI target that skipes all checks
ci-skip: lint-skip test-skip build-skip
all: build test docker-build docker-push deploy setup-pre-commit ci test-skip lint-skip build-skip deploy-skip ci-skip