-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloudbuild.yaml
45 lines (38 loc) · 1.23 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
steps:
- name: 'gcr.io/kaniko-project/executor:a1af057f997316bfb1c4d2d82719d78481a02a79'
args:
- --destination=gcr.io/$PROJECT_ID/refsheet-site:$REVISION_ID
- --cache=true
#== Upload Assets
- name: 'gcr.io/$PROJECT_ID/refsheet-site:$REVISION_ID'
volumes:
- name: 'artifacts'
path: '/artifacts'
entrypoint: 'bash'
args:
- -c
- 'cp -R /app/public/* /artifacts'
- name: 'gcr.io/cloud-builders/gsutil'
volumes:
- name: 'artifacts'
path: '/artifacts'
args:
- -m
- cp
- -r
- /artifacts/*
- gs://assets.refsheet.net/
#== DEPLOY
# Deploy Web
- name: 'gcr.io/cloud-builders/kubectl'
args: ['set', 'image', 'deployment', 'refsheet-prod', "refsheet-prod=gcr.io/$PROJECT_ID/refsheet-site:$REVISION_ID"]
env:
- 'CLOUDSDK_COMPUTE_ZONE=us-central1-a'
- 'CLOUDSDK_CONTAINER_CLUSTER=refsheet-prod-clone-1'
# Deploy Worker
- name: 'gcr.io/cloud-builders/kubectl'
args: ['set', 'image', 'deployment', 'refsheet-prod-worker', "refsheet-prod-worker=gcr.io/$PROJECT_ID/refsheet-site:$REVISION_ID"]
env:
- 'CLOUDSDK_COMPUTE_ZONE=us-central1-a'
- 'CLOUDSDK_CONTAINER_CLUSTER=refsheet-prod-clone-1'
timeout: 3600s