-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
29 lines (27 loc) · 993 Bytes
/
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
timeout: 3600s # 1-hr
tags:
- open-node-platform
substitutions:
_PROJECT_ID: ${PROJECT_ID}
_GCP_REGION: ${GCP_REGION}
_NODE_NAME: ${NODE_NAME}
_CLUSTER_NAME: ${CLUSTER_NAME}
_SNAPSHOT_NAME: ${SNAPSHOT_NAME}
options:
substitution_option: 'ALLOW_LOOSE'
steps:
- name: "gcr.io/${_PROJECT_ID}/open-node-platform-installer"
id: "add-node"
entrypoint: 'bash'
args:
- '-xe'
- '-c'
- |
gcloud container clusters get-credentials ${_CLUSTER_NAME} --region ${_GCP_REGION}
sed -i'' -e "s/YOUR_NODE_NAME/${_NODE_NAME}/g" chain/geth/deployment.yaml
sed -i'' -e "s/YOUR_NODE_NAME/${_NODE_NAME}/g" chain/geth/pvc-from-snapshot.yaml
sed -i'' -e "s/SNAPSHOT_NAME/${_SNAPSHOT_NAME}/g" chain/geth/pvc-from-snapshot.yaml
sed -i'' -e "s/YOUR_NODE_NAME/${_NODE_NAME}/g" chain/geth/service.yaml
kubectl apply -f chain/geth/pvc-from-snapshot.yaml
kubectl apply -f chain/geth/deployment.yaml
kubectl apply -f chain/geth/service.yaml