-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloudbuild.yaml
36 lines (34 loc) · 1.28 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
# NOTE: This is a work in progres, use as a reference only
substitutions:
_TARGET_CLUSTER: eth2
_TARGET_ZONE: us-central1-c
_LIGHTHOUSE_NETWORK: prater
_GETH_NETWORK: goerli
steps:
## Lighthouse
# NOTE: Assumes validators directory is stored in GCS bucket
- name: 'gcr.io/cloud-builders/gcloud'
args: ['gsutil', 'cp', '-r', 'gs://$PROJECT_ID-lighthouse/$_LIGHTHOUSE_NETWORK/validators', './lighthouse/$_LIGHTHOUSE_NETWORK/validators']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'us.gcr.io/$PROJECT_ID/lighthouse:$COMMIT_SHA', './lighthouse']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us.gcr.io/$PROJECT_ID/lighthouse:$COMMIT_SHA']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'us.gcr.io/$PROJECT_ID/lighthouse:$COMMIT_SHA', 'us.gcr.io/$PROJECT_ID/lighthouse:latest']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us.gcr.io/$PROJECT_ID/lighthouse:latest']
- name: 'gcr.io/$PROJECT_ID/helm'
args: [
'upgrade',
'--set',
'lighthouse.image.tag=$COMMIT_SHA',
'--set',
'lighthouse.image.repository=us.gcr.io/$PROJECT_ID/$_IMAGE_NAME',
'--install',
'$_IMAGE_NAME',
'infrastructure/leaders/'
]
env:
- 'TILLERLESS=true'
- 'CLOUDSDK_COMPUTE_ZONE=$_TARGET_ZONE'
- 'CLOUDSDK_CONTAINER_CLUSTER=$_TARGET_CLUSTER'