-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 loc) · 1.22 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
.RECIPEPREFIX = >
.PHONY: test unittest gohealth allchecks staticcheck govuln build helm helmtest
### Variables
RELEASE_IMAGE_NAME := torbendury/gke-preemptible-sniper
allchecks: test staticcheck govuln
### Run the tests
test: unittest gohealth
> helm lint helm/gke-preemptible-sniper
unittest:
> go test -v -race ./...
gohealth:
> go mod verify
> go vet ./...
staticcheck:
> go run honnef.co/go/tools/cmd/staticcheck@latest -checks=all,-ST1000,-U1000 ./...
govuln:
> go run golang.org/x/vuln/cmd/govulncheck@latest ./...
### Build the release container
build:
> docker build --no-cache -t $(RELEASE_IMAGE_NAME):latest -f Dockerfile .
### Install the Helm Chart
helm:
> helm repo add gke-preemptible-sniper https://torbendury.github.io/gke-preemptible-sniper/ || true
> helm repo update
> helm upgrade --install gke-preemptible-sniper gke-preemptible-sniper/gke-preemptible-sniper --namespace gke-preemptible-sniper --create-namespace
helmtest:
> helm repo add gke-preemptible-sniper https://torbendury.github.io/gke-preemptible-sniper/ || true
> helm repo update
> helm upgrade --install gke-preemptible-sniper gke-preemptible-sniper/gke-preemptible-sniper --namespace gke-preemptible-sniper --create-namespace --values .local/values.yaml