-
Notifications
You must be signed in to change notification settings - Fork 9
/
cloudbuild.yaml
48 lines (46 loc) · 1.15 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
46
47
48
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/$PROJECT_ID/hexdocs-build:latest']
id: pull-build
waitFor: ['-']
- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/$PROJECT_ID/hexdocs:latest']
id: pull-app
waitFor: ['-']
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '-t'
- 'gcr.io/$PROJECT_ID/hexdocs-build:latest'
- '-t'
- 'gcr.io/$PROJECT_ID/hexdocs-build:$SHORT_SHA'
- '--cache-from'
- 'gcr.io/$PROJECT_ID/hexdocs-build:latest'
- '--target'
- 'build'
- '.'
id: build-build
waitFor: ['pull-build']
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '-t'
- 'gcr.io/$PROJECT_ID/hexdocs:latest'
- '-t'
- 'gcr.io/$PROJECT_ID/hexdocs:$SHORT_SHA'
- '--cache-from'
- 'gcr.io/$PROJECT_ID/hexdocs-build:latest'
- '--cache-from'
- 'gcr.io/$PROJECT_ID/hexdocs:latest'
- '--target'
- 'app'
- '.'
id: build-app
waitFor: ['build-build', 'pull-app']
images:
- 'gcr.io/$PROJECT_ID/hexdocs-build:latest'
- 'gcr.io/$PROJECT_ID/hexdocs:latest'
- 'gcr.io/$PROJECT_ID/hexdocs-build:$SHORT_SHA'
- 'gcr.io/$PROJECT_ID/hexdocs:$SHORT_SHA'
options:
machineType: 'N1_HIGHCPU_8'