-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (41 loc) · 982 Bytes
/
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
project := grow-prod
service := editor-dev
region := us-central1
tag := latest
build:
gcloud builds submit \
--project=$(project)
build-prod:
gcloud builds submit \
--project=$(project) \
--config=cloudbuild-prod.yaml
build-prod-tag:
gcloud builds submit \
--project=$(project) \
--substitutions _TAG=${tag} \
--config=cloudbuild-prod-tag.yaml
build-and-deploy:
$(MAKE) build
$(MAKE) deploy
build-and-deploy-prod:
$(MAKE) build-prod
$(MAKE) deploy-prod
build-and-deploy-prod-tag:
$(MAKE) build-prod-tag
$(MAKE) deploy-prod
deploy:
gcloud run deploy ${service} \
--project=$(project) \
--platform managed \
--labels source=main \
--region ${region} \
--allow-unauthenticated \
--image gcr.io/${project}/editor-dev:main
deploy-prod:
gcloud run deploy ${service}-prod \
--project=$(project) \
--platform managed \
--labels source=latest \
--region ${region} \
--allow-unauthenticated \
--image gcr.io/${project}/editor-dev:${tag}