-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.production.yml
50 lines (46 loc) · 1.56 KB
/
cloudbuild.production.yml
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
46
47
48
49
50
steps:
#== BUILD
# Kaniko 0.17.0 fixes chrome install bug: https://github.com/GoogleContainerTools/kaniko/issues/769
# Kaniko 0.17.1 fixes /var/run issue in Google Cloud: https://github.com/GoogleContainerTools/kaniko/issues/1001
# OPEN: Kaniko 0.17.x produces invalid images (whiteout?): https://github.com/GoogleContainerTools/kaniko/issues/1039
# CLOSED?: New Kaniko version SHOULD fix this, pinning tot he debug tag mentioned here: https://github.com/GoogleContainerTools/kaniko/issues/1039#issuecomment-590954787
- name: 'gcr.io/kaniko-project/executor:a1af057f997316bfb1c4d2d82719d78481a02a79'
id: Build Container
args:
- --destination=gcr.io/$PROJECT_ID/refsheet-admin-frontend-ci:$REVISION_ID
- --cache=true
- --dockerfile=./Dockerfile.ci
- name: 'gcr.io/$PROJECT_ID/refsheet-admin-frontend-ci:$REVISION_ID'
id: Build App
dir: /app
args: [ 'npm', 'run', 'build' ]
waitFor:
- Build Container
volumes:
- name: 'artifacts'
path: '/app/build'
- name: 'gcr.io/cloud-builders/gsutil'
id: Upload Artifacts
volumes:
- name: 'artifacts'
path: '/artifacts'
args:
- -m
- -h
- 'Cache-Control: private, max-age=0, no-transform'
- cp
- -a
- public-read
- -rZ
- /artifacts/*
- gs://admin.refsheet.net/
waitFor:
- Build App
- name: 'gcr.io/cloud-builders/gsutil'
id: Set Permissions
args:
- setmeta
- -r
- -h
- 'Cache-Control: public, max-age=31559652'
- gs://admin.refsheet.net/static