-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
43 lines (36 loc) · 1.06 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
steps:
- id: 'install dependencies'
name: 'node:10.23.0'
args: [ "yarn" ]
waitFor:
- '-'
- id: 'prepare env file'
name: 'alpine'
entrypoint: sh
args:
- '-c'
- |
sed -i -e "s#target: 'your pre url',#target: '${_API_URL}',#g" config/proxy.ts
waitFor:
- '-'
- id: 'build release'
name: 'node:10.23.0'
args: [ "yarn","build" ]
waitFor:
- 'prepare env file'
- 'install dependencies'
- id: 'clear DEMO storage before new release'
name: 'gcr.io/cloud-builders/gsutil'
args: ['-m', '-q', 'rm', '-rf', "gs://${_STORAGE}/**"]
waitFor:
- 'build release'
- id: 'push to DEMO storage'
name: 'gcr.io/cloud-builders/gsutil'
args: ['-h', 'Cache-Control:no-cache,max-age=0','-m', 'cp', '-r', './dist/*', 'gs://${_STORAGE}/lxp/']
waitFor:
- 'clear DEMO storage before new release'
- id: 'add public access'
name: 'gcr.io/cloud-builders/gsutil'
args: ['acl', 'ch', '-u', 'AllUsers:R', '-r', 'gs://${_STORAGE}/*']
waitFor:
- 'push to DEMO storage'