-
Notifications
You must be signed in to change notification settings - Fork 5
/
cloudbuild.yaml
55 lines (54 loc) · 1.35 KB
/
cloudbuild.yaml
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
steps:
- name: node:10
entrypoint: yarn
args:
- install
id: "client-install"
dir: "client/"
- name: node:10
entrypoint: yarn
args:
- create-env
id: "client-env"
dir: "client/"
env:
- "REACT_APP_GOOGLE_MAPS_API_KEY=${_GOOGLE_MAPS_API_KEY}"
- "REACT_APP_MICROAPPS_CLIENT_ID=${_MICROAPPS_CLIENT_ID}"
waitFor: ["client-install"]
- name: node:10
entrypoint: yarn
args:
- build
id: "client-build"
dir: "client/"
waitFor: ["client-env"]
- name: "gcr.io/cloud-builders/gcloud"
args: ["app", "deploy"]
dir: "client/"
waitFor: ["client-build"]
timeout: 300s
- name: node:10
entrypoint: yarn
args:
- create-env
id: "server-env"
dir: "server/"
env:
- "EXPRESS_SERVER_MICROAPP_ID=${_MICROAPP_ID}"
- "EXPRESS_SERVER_MICROAPPS_CLIENT_ID=${_MICROAPPS_CLIENT_ID}"
- "EXPRESS_SERVER_SERVICE_ACCOUNT_CLIENT_EMAIL=${_SERVICE_ACCOUNT_CLIENT_EMAIL}"
- "EXPRESS_SERVER_SERVICE_ACCOUNT_PRIVATE_KEY=${_SERVICE_ACCOUNT_PRIVATE_KEY}"
- name: node:10
entrypoint: yarn
args:
- install
id: "server-build"
dir: "server/"
waitFor: ["server-env"]
- name: "gcr.io/cloud-builders/gcloud"
args: ["app", "deploy"]
dir: "server/"
waitFor: ["server-build"]
timeout: 300s
options:
machineType: "N1_HIGHCPU_8"