@@ -41,19 +41,18 @@ before:
41
41
name: caren-system
42
42
$(helm template {{ .ProjectName }} ./charts/{{ .ProjectName }} \
43
43
--namespace caren-system \
44
- --set-string image.tag=v {{ trimprefix .Version "v" }} \
45
- --set-string helmRepositoryImage.tag=v {{ trimprefix .Version "v" }} \
46
- {{ if .IsSnapshot }} --set-string image.repository=ko.local/{{ .ProjectName }}{{ end }} \
44
+ --set-string image.tag={{ .Version }} \
45
+ --set-string helmRepositoryImage.tag={{ .Version }}{{ if .IsSnapshot }}-{{ .Env.GOARCH }} \
46
+ --set-string image.repository=ko.local/{{ .ProjectName }}{{ end }} \
47
47
)
48
48
EOF'
49
- - sed -i -e 's/\${/$${/g' -e 's/v0.0.0-dev/v {{ trimprefix .Version "v" }}/g' runtime-extension-components.yaml
49
+ - sed -i -e 's/\${/$${/g' -e 's/v0.0.0-dev/{{ .Version }}/g' runtime-extension-components.yaml
50
50
- |
51
51
sh -ec 'gojq --yaml-input --yaml-output \
52
52
".releaseSeries |= (. + [{contract: \"v1beta1\", major: {{ .Major }}, minor: {{ .Minor }}}] | unique)" \
53
53
metadata.yaml >release-metadata.yaml'
54
54
- make template-helm-repository
55
55
56
-
57
56
builds :
58
57
- id : cluster-api-runtime-extensions-nutanix
59
58
dir : ./cmd
@@ -67,7 +66,7 @@ builds:
67
66
- -X 'k8s.io/component-base/version.buildDate={{ .CommitDate }}'
68
67
- -X 'k8s.io/component-base/version.gitCommit={{ .FullCommit }}'
69
68
- -X 'k8s.io/component-base/version.gitTreeState={{ .Env.GIT_TREE_STATE }}'
70
- - -X 'k8s.io/component-base/version.gitVersion=v {{ trimprefix .Version "v" }}'
69
+ - -X 'k8s.io/component-base/version.gitVersion={{ .Version }}'
71
70
- -X 'k8s.io/component-base/version.major={{ .Major }}'
72
71
- -X 'k8s.io/component-base/version.minor={{ .Minor }}'
73
72
- -X 'k8s.io/component-base/version/verflag.programName={{ .ProjectName }}'
@@ -86,66 +85,52 @@ builds:
86
85
KO_DOCKER_REPO=ko.local/{{ .ProjectName }} \
87
86
ko build \
88
87
--bare \
89
- -t v {{ trimprefix .Version "v" }} \
88
+ -t {{ .Version }} \
90
89
./cmd
91
90
fi'
92
91
93
92
archives :
94
- - name_template : ' {{ .ProjectName }}_v {{ trimprefix .Version "v" }}_{{ .Os }}_{{ .Arch }}'
93
+ - name_template : ' {{ .ProjectName }}_ {{ .Version }}_{{ .Os }}_{{ .Arch }}'
95
94
builds :
96
95
- cluster-api-runtime-extensions-nutanix
97
96
98
97
dockers :
99
98
- 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 }}'
99
+ - ' ghcr.io/nutanix-cloud-native/caren-helm-reg:{{ .Version }}-amd64'
108
100
use : buildx
109
101
dockerfile : ./hack/addons/mindthegap-helm-registry/Dockerfile
110
102
extra_files :
111
103
- hack/addons/mindthegap-helm-registry/repos.yaml
112
104
build_flag_templates :
113
105
- " --platform=linux/amd64"
114
- - " --builder=caren"
115
106
- " --pull"
116
107
- " --label=org.opencontainers.image.created={{.CommitDate}}"
117
108
- " --label=org.opencontainers.image.title=caren-helm-reg"
118
109
- " --label=org.opencontainers.image.revision={{.FullCommit}}"
119
- - ' --label=org.opencontainers.image.version=v {{ trimprefix .Version "v" }}'
110
+ - ' --label=org.opencontainers.image.version={{ .Version }}'
120
111
- " --label=org.opencontainers.image.source={{.GitURL}}"
112
+ goarch : amd64
121
113
- image_templates :
122
- # Specify the image tag including `-arm64` suffix if the build is not a snapshot build or is not being built on
123
- # arm64 machine. This allows for using the snapshot image build without the architecture specific suffix
124
- # consistently on local machines, i.e. can always use `ghcr.io/nutanix-cloud-native/caren-helm-reg:v<VERSION>` on the machine the snapshot
125
- # is built on.
126
- #
127
- # For a release build the `-arm64` suffix will always be included and the `docker_manifests` specification below
128
- # will create the final multiplatform manifest to be pushed to the registry.
129
- - ' ghcr.io/nutanix-cloud-native/caren-helm-reg:v{{ trimprefix .Version "v" }}{{ if or (not .IsSnapshot) (not (eq .Runtime.Goarch "arm64")) }}-arm64{{ end }}'
114
+ - ' ghcr.io/nutanix-cloud-native/caren-helm-reg:{{ .Version }}-arm64'
130
115
use : buildx
131
116
dockerfile : ./hack/addons/mindthegap-helm-registry/Dockerfile
132
117
extra_files :
133
118
- hack/addons/mindthegap-helm-registry/repos.yaml
134
119
build_flag_templates :
135
120
- " --platform=linux/arm64"
136
- - " --builder=caren"
137
121
- " --pull"
138
122
- " --label=org.opencontainers.image.created={{.CommitDate}}"
139
123
- " --label=org.opencontainers.image.title=caren-helm-reg"
140
124
- " --label=org.opencontainers.image.revision={{.FullCommit}}"
141
- - ' --label=org.opencontainers.image.version=v {{ trimprefix .Version "v" }}'
125
+ - ' --label=org.opencontainers.image.version={{ .Version }}'
142
126
- " --label=org.opencontainers.image.source={{.GitURL}}"
127
+ goarch : arm64
143
128
144
129
docker_manifests :
145
- - name_template : ghcr.io/nutanix-cloud-native/caren-helm-reg:v {{ trimprefix .Version "v" }}
130
+ - name_template : ghcr.io/nutanix-cloud-native/caren-helm-reg:{{ .Version }}
146
131
image_templates :
147
- - ghcr.io/nutanix-cloud-native/caren-helm-reg:v {{ trimprefix .Version "v" }}-amd64
148
- - ghcr.io/nutanix-cloud-native/caren-helm-reg:v {{ trimprefix .Version "v" }}-arm64
132
+ - ghcr.io/nutanix-cloud-native/caren-helm-reg:{{ .Version }}-amd64
133
+ - ghcr.io/nutanix-cloud-native/caren-helm-reg:{{ .Version }}-arm64
149
134
150
135
kos :
151
136
- id : cluster-api-runtime-extensions-nutanix
@@ -156,23 +141,23 @@ kos:
156
141
- -X 'k8s.io/component-base/version.buildDate={{ .CommitDate }}'
157
142
- -X 'k8s.io/component-base/version.gitCommit={{ .FullCommit }}'
158
143
- -X 'k8s.io/component-base/version.gitTreeState={{ .Env.GIT_TREE_STATE }}'
159
- - -X 'k8s.io/component-base/version.gitVersion=v {{ trimprefix .Version "v" }}'
144
+ - -X 'k8s.io/component-base/version.gitVersion={{ .Version }}'
160
145
- -X 'k8s.io/component-base/version.major={{ .Major }}'
161
146
- -X 'k8s.io/component-base/version.minor={{ .Minor }}'
162
147
- -X 'k8s.io/component-base/version/verflag.programName={{ .ProjectName }}'
163
148
labels :
164
149
org.opencontainers.image.created : " {{ .CommitDate }}"
165
150
org.opencontainers.image.title : " {{ .ProjectName }}"
166
151
org.opencontainers.image.revision : " {{ .FullCommit }}"
167
- org.opencontainers.image.version : v {{ trimprefix .Version "v" }}
152
+ org.opencontainers.image.version : " {{ .Version }} "
168
153
org.opencontainers.image.source : " {{ .GitURL }}"
169
154
platforms :
170
155
- linux/amd64
171
156
- linux/arm64
172
157
repository : ghcr.io/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix
173
158
bare : true
174
159
tags :
175
- - v {{ trimprefix .Version "v" }}
160
+ - " {{ .Version }} "
176
161
177
162
checksum :
178
163
name_template : ' checksums.txt'
0 commit comments