-
Notifications
You must be signed in to change notification settings - Fork 2
/
acb.tpl.yaml
203 lines (183 loc) · 6.41 KB
/
acb.tpl.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
version: 1.0-preview-1
steps:
- cmd: multiarch/qemu-user-static --reset -p yes
privileged: true
- id: pull-hmcts-base-amd64
cmd: docker pull --platform linux/amd64 hmctspublic.azurecr.io/base/node:20-alpine && docker tag hmctspublic.azurecr.io/base/node:20-alpine hmctspublic.azurecr.io/base/node/linux/amd64:20-alpine
when: ["-"]
retries: 3
retryDelay: 5
- id: pull-base-amd64
cmd: docker pull --platform linux/amd64 {{.Run.Registry}}/ccd/ccd-case-activity-api/base:amd64 && docker tag {{.Run.Registry}}/ccd/ccd-case-activity-api/base:amd64 {{.Run.Registry}}/ccd/ccd-case-activity-api/base:amd64
when: ["-"]
ignoreErrors: true
retries: 3
retryDelay: 5
- id: pull-build-amd64
cmd: docker pull --platform linux/amd64 {{.Run.Registry}}/ccd/ccd-case-activity-api/build:amd64 && docker tag {{.Run.Registry}}/ccd/ccd-case-activity-api/build:amd64 {{.Run.Registry}}/ccd/ccd-case-activity-api/build:amd64
when: ["-"]
ignoreErrors: true
retries: 3
retryDelay: 5
- id: base-amd64
build: >
-t {{.Run.Registry}}/ccd/ccd-case-activity-api/base:amd64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/base:amd64
--build-arg PLATFORM=/linux/amd64
--platform linux/amd64
--target base
.
when:
- pull-base-amd64
timeout: 7200
retries: 3
retryDelay: 5
- id: build-amd64
build: >
-t {{.Run.Registry}}/ccd/ccd-case-activity-api/build:amd64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/base:amd64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/build:amd64
--build-arg PLATFORM=/linux/amd64
--platform linux/amd64
--target build
.
when:
- base-amd64
- pull-build-amd64
timeout: 7200
retries: 3
retryDelay: 5
- id: runtime-amd64
build: >
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/base:amd64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/build:amd64
--build-arg PLATFORM=/linux/amd64
--platform linux/amd64
--target runtime
.
when:
- base-amd64
- build-amd64
timeout: 7200
retries: 3
retryDelay: 5
- id: pull-hmcts-base-arm64
cmd: docker pull --platform linux/arm64 hmctspublic.azurecr.io/base/node:20-alpine && docker tag hmctspublic.azurecr.io/base/node:20-alpine hmctspublic.azurecr.io/base/node/linux/arm64:20-alpine
when:
- pull-hmcts-base-amd64
retries: 3
retryDelay: 5
- id: pull-base-arm64
cmd: docker pull --platform linux/arm64 {{.Run.Registry}}/ccd/ccd-case-activity-api/base:arm64 && docker tag {{.Run.Registry}}/ccd/ccd-case-activity-api/base:arm64 {{.Run.Registry}}/ccd/ccd-case-activity-api/base:arm64
when:
- pull-base-amd64
ignoreErrors: true
retries: 3
retryDelay: 5
- id: pull-build-arm64
cmd: docker pull --platform linux/arm64 {{.Run.Registry}}/ccd/ccd-case-activity-api/build:arm64 && docker tag {{.Run.Registry}}/ccd/ccd-case-activity-api/build:arm64 {{.Run.Registry}}/ccd/ccd-case-activity-api/build:arm64
when:
- pull-build-amd64
ignoreErrors: true
retries: 3
retryDelay: 5
- id: reset-qemu
cmd: multiarch/qemu-user-static --reset -p yes
when:
- pull-build-arm64
privileged: true
retries: 3
retryDelay: 5
- id: base-arm64
build: >
-t {{.Run.Registry}}/ccd/ccd-case-activity-api/base:arm64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/base:arm64
--build-arg PLATFORM=/linux/arm64
--platform linux/arm64/v8
--target base
.
when:
- reset-qemu
timeout: 7200
retries: 3
retryDelay: 5
- id: build-arm64
build: >
-t {{.Run.Registry}}/ccd/ccd-case-activity-api/build:arm64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/base:arm64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/build:arm64
--build-arg PLATFORM=/linux/arm64
--platform linux/arm64/v8
--target build
.
when:
- base-arm64
- pull-build-arm64
timeout: 7200
retries: 3
retryDelay: 5
- id: runtime-arm64
build: >
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/base:arm64
--cache-from {{.Run.Registry}}/ccd/ccd-case-activity-api/build:arm64
--build-arg PLATFORM=/linux/arm64
--platform linux/arm64/v8
--target runtime
.
when:
- base-arm64
- build-arm64
timeout: 7200
retries: 3
retryDelay: 5
- id: push-images
push:
- "hmctspublic.azurecr.io/ccd/ccd-case-activity-api/base:amd64"
- "hmctspublic.azurecr.io/ccd/ccd-case-activity-api/build:amd64"
- "{{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64"
- "hmctspublic.azurecr.io/ccd/ccd-case-activity-api/base:arm64"
- "hmctspublic.azurecr.io/ccd/ccd-case-activity-api/build:arm64"
- "{{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64"
when:
- runtime-amd64
- runtime-arm64
retries: 3
retryDelay: 5
- id: manifest-create-base
cmd: docker manifest create hmctspublic.azurecr.io/ccd/ccd-case-activity-api/base hmctspublic.azurecr.io/ccd/ccd-case-activity-api/base:amd64 hmctspublic.azurecr.io/ccd/ccd-case-activity-api/base:arm64
when:
- push-images
retries: 3
retryDelay: 5
- id: manifest-push-base
cmd: docker manifest push --purge hmctspublic.azurecr.io/ccd/ccd-case-activity-api/base
when:
- manifest-create-base
retries: 3
retryDelay: 5
- id: manifest-create-build
cmd: docker manifest create hmctspublic.azurecr.io/ccd/ccd-case-activity-api/build hmctspublic.azurecr.io/ccd/ccd-case-activity-api/build:amd64 hmctspublic.azurecr.io/ccd/ccd-case-activity-api/build:arm64
when:
- push-images
retries: 3
retryDelay: 5
- id: manifest-push-build
cmd: docker manifest push --purge hmctspublic.azurecr.io/ccd/ccd-case-activity-api/build
when:
- manifest-create-build
retries: 3
retryDelay: 5
- id: manifest-create-runtime
cmd: docker manifest create {{.Run.Registry}}/{{CI_IMAGE_TAG}} {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64 {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64
when:
- push-images
retries: 3
retryDelay: 5
- id: manifest-push-runtime
cmd: docker manifest push --purge {{.Run.Registry}}/{{CI_IMAGE_TAG}}
when:
- manifest-create-runtime
retries: 3
retryDelay: 5