-
Notifications
You must be signed in to change notification settings - Fork 45
/
cloudbuild.yaml
61 lines (58 loc) · 1.6 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
56
57
58
59
60
61
images:
- gcr.io/$PROJECT_ID/everest-$_KUBERNETES_NAMESPACE:$SHORT_SHA
options:
machineType: N1_HIGHCPU_32
timeout: 900s
steps:
# Build Docker image
- name: gcr.io/cloud-builders/docker
args:
- build
- --build-arg
- GATSBY_IPFS_HTTP_URI=https://ipfs.everest.link/
- --build-arg
- GATSBY_NETWORK_CONNECTOR_URI=https://$_ETHEREUM_NETWORK.infura.io/v3/$_INFURA_ID
- --build-arg
- GATSBY_INFURA_ID=$_INFURA_ID
- --build-arg
- GATSBY_NETWORK_URI=https://api.thegraph.com
- --build-arg
- GATSBY_GRAPHQL_HTTP_URI=https://api.thegraph.com/subgraphs/name/$_SUBGRAPH_NAME
- --build-arg
- GATSBY_CHAIN_ID=$_ETHEREUM_CHAIN_ID
- -t
- gcr.io/$PROJECT_ID/everest-$_KUBERNETES_NAMESPACE:$SHORT_SHA
- -f
- Dockerfile
- .
# Inject image into the k8s config
- name: gcr.io/$PROJECT_ID/kustomize
args:
- edit
- set
- image
- everest=gcr.io/$PROJECT_ID/everest-$_KUBERNETES_NAMESPACE:$SHORT_SHA
dir: k8s
env:
- CLOUDSDK_COMPUTE_ZONE=us-central1
- CLOUDSDK_CONTAINER_CLUSTER=production
# Change the k8s deployment namespace
- name: gcr.io/$PROJECT_ID/kustomize
args:
- edit
- set
- namespace
- everest-$_KUBERNETES_NAMESPACE
dir: k8s
env:
- CLOUDSDK_COMPUTE_ZONE=us-central1
- CLOUDSDK_CONTAINER_CLUSTER=production
# Apply k8s changes
- name: gcr.io/$PROJECT_ID/kustomize
dir: k8s
args:
- build
env:
- APPLY=true
- CLOUDSDK_COMPUTE_ZONE=us-central1
- CLOUDSDK_CONTAINER_CLUSTER=production