-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
45 lines (37 loc) · 1.72 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
start-watch:
go run -tags $(or $(datree_build_env),staging) -ldflags="-X github.com/datreeio/admission-webhook-datree/pkg/config.WebhookVersion=0.0.1" ./cmd/webhook-server/webhook-server.go
start:
go run -tags $(or $(datree_build_env),staging) -ldflags="-X github.com/datreeio/admission-webhook-datree/pkg/config.WebhookVersion=0.0.1" ./cmd/webhook-server/webhook-server.go
start-dev:
make datree_build_env=dev start
start-staging:
make datree_build_env=staging start
start-production:
make datree_build_env=main start
build:
go build -tags $(or $(datree_build_env),staging) -ldflags="-X github.com/datreeio/admission-webhook-datree/pkg/config.WebhookVersion=0.0.1" -o webhook-datree
build-dev:
make datree_build_env=dev build
build-staging:
make datree_build_env=staging build
build-production:
make datree_build_env=main build
test:
DATREE_ENFORCE="true" go test ./...
deploy-in-minikube:
bash ./scripts/deploy-in-minikube.sh
run-in-minikube:
bash ./scripts/run-in-minikube.sh
test-in-minikube:
bash ./scripts/test-in-minikube.sh
helm-install-local-in-minikube:
eval $(minikube docker-env) && \
./scripts/build-docker-image.sh && \
helm install -n datree datree-webhook ./charts/datree-admission-webhook --set datree.token="${DATREE_TOKEN}"
helm-upgrade-local:
helm upgrade -n datree datree-webhook ./charts/datree-admission-webhook --reuse-values --set datree.enforce="true"
helm-uninstall:
helm uninstall -n datree datree-webhook
helm-install-staging:
helm install -n datree datree-webhook ./charts/datree-admission-webhook --set datree.token="${DATREE_TOKEN}" --set scan_job.image.repository="datree/scan-job-staging" \
--set scan_job.image.tag="latest" --set image.repository="datree/webhook-staging" --set image.tag="latest"