forked from apigee/registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (59 loc) · 1.75 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
lite:
go install ./...
all:
./tools/GENERATE-RPC.sh
./tools/GENERATE-GRPC.sh
./tools/GENERATE-GAPIC.sh
./tools/GENERATE-APG.sh
./tools/GENERATE-ENVOY-DESCRIPTORS.sh
go install ./...
apg:
./tools/GENERATE-APG.sh
go install ./cmd/apg
protos:
./tools/GENERATE-RPC.sh
./tools/GENERATE-GRPC.sh
./tools/GENERATE-GAPIC.sh
./tools/GENERATE-ENVOY-DESCRIPTORS.sh
lintfix:
golangci-lint run --fix
test:
go clean -testcache
go test ./...
clean:
rm -rf docs/ third_party/api-common-protos
build:
ifndef REGISTRY_PROJECT_IDENTIFIER
@echo "Error! REGISTRY_PROJECT_IDENTIFIER must be set."; exit 1
endif
gcloud builds submit .
deploy:
ifndef REGISTRY_PROJECT_IDENTIFIER
@echo "Error! REGISTRY_PROJECT_IDENTIFIER must be set."; exit 1
endif
gcloud run deploy registry-backend --image gcr.io/${REGISTRY_PROJECT_IDENTIFIER}/registry-backend --platform managed
deploy-gke:
ifndef REGISTRY_PROJECT_IDENTIFIER
@echo "Error! REGISTRY_PROJECT_IDENTIFIER must be set."; exit 1
endif
ifeq ($(LB),internal)
./deployments/gke/DEPLOY-TO-GKE.sh deployments/gke/service-internal.yaml
else
./deployments/gke/DEPLOY-TO-GKE.sh
endif
# Actions for controller
deploy-controller-job:
ifndef REGISTRY_PROJECT_IDENTIFIER
@echo "Error! REGISTRY_PROJECT_IDENTIFIER must be set."; exit 1
endif
ifndef REGISTRY_MANIFEST_ID
@echo "Error! REGISTRY_MANIFEST_ID must be set."; exit 1
endif
gcloud container clusters get-credentials registry-backend --zone us-central1-a
envsubst < deployments/controller/gke-job/cron-job.yaml | kubectl apply -f -
deploy-controller-dashboard:
ifndef REGISTRY_PROJECT_IDENTIFIER
@echo "Error! REGISTRY_PROJECT_IDENTIFIER must be set."; exit 1
endif
./deployments/controller/dashboard/DEPLOY.sh
deploy-controller: deploy-controller-job deploy-controller-dashboard