-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
72 lines (60 loc) · 1.96 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
72
lite:
go install ./...
all:
./tools/GENERATE-RPC.sh
./tools/GENERATE-GRPC.sh
./tools/GENERATE-GAPIC.sh
./tools/GENERATE-APX.sh
go install ./...
apg:
./tools/GENERATE-APX.sh
go install ./cmd/apx
protos:
./tools/GENERATE-RPC.sh
./tools/GENERATE-GRPC.sh
./tools/GENERATE-GAPIC.sh
py-protos:
./tools/GENERATE-PYTHON.sh
test:
go test ./...
# deploy registry-server on CloudRun
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-server:latest --platform managed
# deploy registry-server on GKE
deploy-gke:
ifndef REGISTRY_PROJECT_IDENTIFIER
@echo "Error! REGISTRY_PROJECT_IDENTIFIER must be set."; exit 1
endif
ifeq ($(LB),internal)
./deployments/registry-server/gke/DEPLOY-TO-GKE.sh deployments/registry-server/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
build-workers:
ifndef REGISTRY_PROJECT_IDENTIFIER
@echo "Error! REGISTRY_PROJECT_IDENTIFIER must be set."; exit 1
endif
gcloud config set project ${REGISTRY_PROJECT_IDENTIFIER}
gcloud builds submit --config deployments/worker-setup/cloudbuild.yaml \
--substitutions _REGISTRY_PROJECT_IDENTIFIER="${REGISTRY_PROJECT_IDENTIFIER}"
deploy-workers:
./deployments/worker-setup/DEPLOY-WORKERS.sh