@@ -96,13 +96,54 @@ archives:
96
96
- cluster-api-runtime-extensions-nutanix
97
97
98
98
dockers :
99
- - id : helm-registry-container
99
+ - image_templates :
100
+ # Specify the image tag including `-amd64` suffix if the build is not a snapshot build or is not being built on
101
+ # amd64 machine. This allows for using the snapshot image build without the architecture specific suffix
102
+ # consistently on local machines, i.e. can always use `ghcr.io/nutanix-cloud-native/caren-helm-reg:v<VERSION>` on the machine the snapshot
103
+ # is built on.
104
+ #
105
+ # For a release build the `-amd64` suffix will always be included and the `docker_manifests` specification below
106
+ # will create the final multiplatform manifest to be pushed to the registry.
107
+ - ' ghcr.io/nutanix-cloud-native/caren-helm-reg:v{{ trimprefix .Version "v" }}{{ if or (not .IsSnapshot) (not (eq .Runtime.Goarch "amd64")) }}-amd64{{ end }}'
100
108
use : buildx
101
109
dockerfile : ./hack/addons/mindthegap-helm-registry/Dockerfile
102
110
extra_files :
103
111
- hack/addons/mindthegap-helm-registry/repos.yaml
112
+ build_flag_templates :
113
+ - " --platform=linux/amd64"
114
+ - " --pull"
115
+ - " --label=org.opencontainers.image.created={{.CommitDate}}"
116
+ - " --label=org.opencontainers.image.title=caren-helm-reg"
117
+ - " --label=org.opencontainers.image.revision={{.FullCommit}}"
118
+ - ' --label=org.opencontainers.image.version=v{{ trimprefix .Version "v" }}'
119
+ - " --label=org.opencontainers.image.source={{.GitURL}}"
120
+ - image_templates :
121
+ # Specify the image tag including `-arm64` suffix if the build is not a snapshot build or is not being built on
122
+ # arm64 machine. This allows for using the snapshot image build without the architecture specific suffix
123
+ # consistently on local machines, i.e. can always use `ghcr.io/nutanix-cloud-native/caren-helm-reg:v<VERSION>` on the machine the snapshot
124
+ # is built on.
125
+ #
126
+ # For a release build the `-arm64` suffix will always be included and the `docker_manifests` specification below
127
+ # will create the final multiplatform manifest to be pushed to the registry.
128
+ - ' ghcr.io/nutanix-cloud-native/caren-helm-reg:v{{ trimprefix .Version "v" }}{{ if or (not .IsSnapshot) (not (eq .Runtime.Goarch "arm64")) }}-arm64{{ end }}'
129
+ use : buildx
130
+ dockerfile : ./hack/addons/mindthegap-helm-registry/Dockerfile
131
+ extra_files :
132
+ - hack/addons/mindthegap-helm-registry/repos.yaml
133
+ build_flag_templates :
134
+ - " --platform=linux/arm64"
135
+ - " --pull"
136
+ - " --label=org.opencontainers.image.created={{.CommitDate}}"
137
+ - " --label=org.opencontainers.image.title=caren-helm-reg"
138
+ - " --label=org.opencontainers.image.revision={{.FullCommit}}"
139
+ - ' --label=org.opencontainers.image.version=v{{ trimprefix .Version "v" }}'
140
+ - " --label=org.opencontainers.image.source={{.GitURL}}"
141
+
142
+ docker_manifests :
143
+ - name_template : ghcr.io/nutanix-cloud-native/caren-helm-reg:v{{ trimprefix .Version "v" }}
104
144
image_templates :
105
- - ' ghcr.io/nutanix-cloud-native/caren-helm-reg:{{ .Version }}'
145
+ - ghcr.io/nutanix-cloud-native/caren-helm-reg:v{{ trimprefix .Version "v" }}-amd64
146
+ - ghcr.io/nutanix-cloud-native/caren-helm-reg:v{{ trimprefix .Version "v" }}-arm64
106
147
107
148
kos :
108
149
- id : cluster-api-runtime-extensions-nutanix
121
162
org.opencontainers.image.created : " {{ .CommitDate }}"
122
163
org.opencontainers.image.title : " {{ .ProjectName }}"
123
164
org.opencontainers.image.revision : " {{ .FullCommit }}"
124
- org.opencontainers.image.version : v{{ .Version }}
165
+ org.opencontainers.image.version : v{{ trimprefix .Version "v" }}
125
166
org.opencontainers.image.source : " {{ .GitURL }}"
126
167
platforms :
127
168
- linux/amd64
0 commit comments