-
Notifications
You must be signed in to change notification settings - Fork 2
/
cloudbuild.yaml
38 lines (34 loc) · 1.01 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
timeout: 3600s
tags:
- open-node-platform
substitutions:
_PROJECT_ID: ${PROJECT_ID}
options:
substitution_option: 'ALLOW_LOOSE'
steps:
- name: "gcr.io/cloud-builders/gcloud"
id: "build-install-image"
entrypoint: bash
args:
- -c
- |
gcloud builds submit --config=build-image/cloudbuild.yaml --substitutions=_PROJECT_ID=${_PROJECT_ID}
- name: "gcr.io/${PROJECT_ID}/open-node-platform-installer"
id: "create-cluster"
entrypoint: 'bash'
args:
- '-xe'
- '-c'
- |
git clone https://github.com/Tenet-X/open-node.git
cd open-node
git checkout dev
sed -i'' -e "s/YOUR_PROJECT_ID/${_PROJECT_ID}/g" terraform.tfvars
terraform init
terraform plan -out=terraform.tfplan
terraform apply -auto-approve terraform.tfplan
gcloud container clusters get-credentials $(terraform output kubernetes_cluster_name) --region $(terraform output region)
kubectl apply -f k8s/pvc.yaml
kubectl apply -f k8s/deployment.yaml
waitFor:
- build-install-image