generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
acb.tpl.yaml
66 lines (60 loc) · 1.78 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
version: 1.0-preview-1
steps:
- id: pull-base-image-amd64
cmd: docker pull --platform linux/amd64 hmctspublic.azurecr.io/base/java:21-distroless && docker tag hmctspublic.azurecr.io/base/java:21-distroless hmctspublic.azurecr.io/base/java/linux/amd64:21-distroless
retries: 3
retryDelay: 3
when: ["-"]
keep: true
- id: runtime-amd64
build: >
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64
--build-arg PLATFORM=/linux/amd64
--platform linux/amd64
.
retries: 3
retryDelay: 3
when:
- pull-base-image-amd64
keep: true
- id: pull-base-image-arm64
cmd: docker pull --platform linux/arm64 hmctspublic.azurecr.io/base/java:21-distroless && docker tag hmctspublic.azurecr.io/base/java:21-distroless hmctspublic.azurecr.io/base/java/linux/arm64:21-distroless
retries: 3
retryDelay: 3
when:
- pull-base-image-amd64
keep: true
- id: runtime-arm64
build: >
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64
--build-arg PLATFORM=/linux/arm64
--platform linux/arm64/v8
.
retries: 3
retryDelay: 3
when:
- pull-base-image-arm64
keep: true
- id: push-images
push:
- "{{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64"
- "{{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64"
retries: 3
retryDelay: 3
when:
- runtime-amd64
- runtime-arm64
- id: manifest-create
cmd: docker manifest create {{.Run.Registry}}/{{CI_IMAGE_TAG}} {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64 {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64
retries: 3
retryDelay: 3
when:
- push-images
keep: true
- id: manifest-push
cmd: docker manifest push --purge {{.Run.Registry}}/{{CI_IMAGE_TAG}}
retries: 3
retryDelay: 3
when:
- manifest-create
keep: true