-
Notifications
You must be signed in to change notification settings - Fork 1
/
acb.tpl.yaml
110 lines (100 loc) · 3.07 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
version: 1.0-preview-1
steps:
- id: pull-base-image-amd64
cmd: docker pull --platform linux/amd64 hmctspublic.azurecr.io/base/node:18-alpine && docker tag hmctspublic.azurecr.io/base/node:18-alpine hmctspublic.azurecr.io/base/node/linux/amd64:18-alpine
retries: 10
retryDelay: 5
when: ['-']
- id: pull-base-amd64
cmd: docker pull {{.Run.Registry}}/plum/frontend/base:amd64 || true
retries: 10
retryDelay: 5
when:
- pull-base-image-amd64
- id: base-amd64
build: >
-t {{.Run.Registry}}/plum/frontend/base:amd64
--cache-from {{.Run.Registry}}/plum/frontend/base:amd64
--build-arg REGISTRY_NAME={{REGISTRY_NAME}}
--build-arg PLATFORM=/linux/amd64
--platform Linux/amd64
--target base
.
retries: 10
retryDelay: 5
when:
- pull-base-amd64
- id: runtime-amd64
build: >
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64
--cache-from {{.Run.Registry}}/plum/frontend/base:amd64
--build-arg REGISTRY_NAME={{REGISTRY_NAME}}
--build-arg PLATFORM=/linux/amd64
--platform Linux/amd64
--target runtime
.
retries: 10
retryDelay: 5
when:
- base-amd64
- id: pull-base-image-arm64
cmd: docker pull --platform linux/arm64 hmctspublic.azurecr.io/base/node:18-alpine && docker tag hmctspublic.azurecr.io/base/node:18-alpine hmctspublic.azurecr.io/base/node/linux/arm64:18-alpine
retries: 10
retryDelay: 5
when:
- pull-base-image-amd64
- id: pull-base-arm64
cmd: docker pull {{.Run.Registry}}/plum/frontend/base-arm64:latest || true
retries: 10
retryDelay: 5
when:
- pull-base-image-arm64
- id: base-arm64
build: >
-t {{.Run.Registry}}/plum/frontend/base:arm64
--cache-from {{.Run.Registry}}/plum/frontend/base:arm64
--build-arg REGISTRY_NAME={{REGISTRY_NAME}}
--build-arg PLATFORM=/linux/arm64
--platform Linux/arm64/v8
--target base
.
retries: 10
retryDelay: 5
when:
- pull-base-arm64
- id: runtime-arm64
build: >
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64
--cache-from {{.Run.Registry}}/plum/frontend/base:arm64
--build-arg REGISTRY_NAME={{REGISTRY_NAME}}
--build-arg PLATFORM=/linux/arm64
--platform Linux/arm64/v8
--target runtime
.
retries: 10
retryDelay: 5
when:
- base-arm64
- id: push-images
push:
- '{{.Run.Registry}}/plum/frontend/base:amd64'
- '{{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64'
- '{{.Run.Registry}}/plum/frontend/base:arm64'
- '{{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64'
retries: 10
retryDelay: 5
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: 10
retryDelay: 5
when:
- push-images
- id: manifest-push
cmd: docker manifest push --purge {{.Run.Registry}}/{{CI_IMAGE_TAG}}
retries: 10
retryDelay: 5
when:
- manifest-create