-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcloudbuild-stage1.yaml
69 lines (60 loc) · 2.23 KB
/
cloudbuild-stage1.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Timeout for complete build: 10h. Default is 10m.
timeout: 36000s
# The default disk size is 100GB. However, the stage1 ISOs are pretty big these
# days. 600GB should give us some breathing room.
options:
diskSizeGb: 600
env:
- 'PROJECT=$PROJECT_ID'
- 'ARTIFACTS=/workspace/output'
############################################################################
# BUILD ARTIFACTS
############################################################################
steps:
# stage1 minimal kernel & initram using stock ubuntu kernel.
- name: gcr.io/$PROJECT_ID/epoxy-images:1.0
args: [
'/workspace/builder.sh', 'stage1_minimal'
]
# stage1 ROMs.
- name: gcr.io/$PROJECT_ID/epoxy-images:1.0
args: [
'/workspace/builder.sh', 'stage1_mlxrom'
]
# stage1 ISOs
# NOTE: must run after stage1_minimal so that kernel & initram are available.
- name: gcr.io/$PROJECT_ID/epoxy-images:1.0
args: [
'/workspace/builder.sh', 'stage1_isos'
]
############################################################################
# DEPLOY VERSIONED ARTIFACTS
#
# Note: the artifacts built above need to be copied to specific locations in
# the target bucket. Currently, the cloudbuilder 'artifacts' directive does
# not support multiple target locations. So, the steps below are explicit.
############################################################################
# stage1_mlxrom
- name: gcr.io/cloud-builders/gsutil
args: [
'-h', 'Cache-Control:private, max-age=0, no-transform', '-m',
'cp', '-r', '/workspace/output/stage1_mlxrom/*',
'gs://epoxy-$PROJECT_ID/$_IMAGES_VERSION/stage1_mlxrom/'
]
# Deploy stage1_mlxrom images again to the 'latest' directory (without version).
- name: gcr.io/cloud-builders/gsutil
# NOTE: use bash as the entry point to take advantage of bash file globbing.
entrypoint: bash
args:
- -c
- >
gsutil -h "Cache-Control:private, max-age=0, no-transform" -m
cp -r /workspace/output/stage1_mlxrom/*/*
gs://epoxy-$PROJECT_ID/$_IMAGES_VERSION/stage1_mlxrom/latest/
# stage1_isos.
- name: gcr.io/cloud-builders/gsutil
args: [
'-h', 'Cache-Control:private, max-age=0, no-transform', '-m',
'cp', '-r', '/workspace/output/stage1_isos/*',
'gs://epoxy-$PROJECT_ID/$_IMAGES_VERSION/stage1_isos/'
]