Skip to content

Commit 40c8387

Browse files
committed
test: create helm-chart-bundle-initializer image for e2e tests
1 parent f01a20e commit 40c8387

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.goreleaser.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ before:
4444
$(helm template {{ .ProjectName }} ./charts/{{ .ProjectName }} \
4545
--namespace caren-system \
4646
--set-string image.tag=v{{ trimprefix .Version "v" }}{{ if .IsSnapshot }}-{{ .Runtime.Goarch }}{{ end }} \
47-
--set-string helmRepository.images.bundleInitializer.tag=v{{ trimprefix .Version "v" }}{{ if .IsSnapshot }}-{{ .Runtime.Goarch }} \
48-
--set-string image.repository={{ .Env.LOCAL_IMAGE_REGISTRY }}/{{ .ProjectName }}{{ end }} \
47+
--set-string helmRepository.images.bundleInitializer.tag=v{{ trimprefix .Version "v" }}{{ if .IsSnapshot }}-{{ .Runtime.Goarch }}{{ end }} \
48+
{{ if .IsSnapshot }}--set-string image.repository={{ .Env.LOCAL_IMAGE_REGISTRY }}/{{ .ProjectName }}{{ end }} \
49+
{{ if .IsSnapshot }}--set-string helmRepository.images.bundleInitializer.repository={{ .Env.LOCAL_IMAGE_REGISTRY }}/cluster-api-runtime-extensions-helm-chart-bundle-initializer{{ end }} \
4950
)
5051
EOF'
5152
- sed -i -e 's/\${/$${/g' -e 's/v0.0.0-dev/v{{ trimprefix .Version "v" }}/g' runtime-extensions-components.yaml
@@ -96,8 +97,16 @@ builds:
9697
--platform linux/{{ .Arch }} \
9798
-t v{{ trimprefix .Version "v" }}-{{ .Arch }} \
9899
./cmd
100+
docker buildx build \
101+
--platform linux/{{ .Arch }} \
102+
-t {{ .Env.LOCAL_IMAGE_REGISTRY }}/cluster-api-runtime-extensions-helm-chart-bundle-initializer:v{{ trimprefix .Version "v" }}-{{ .Arch }} \
103+
-f ./hack/addons/helm-chart-bundler/Dockerfile \
104+
--load \
105+
.
106+
if [ {{ .Env.LOCAL_IMAGE_REGISTRY }} != "ko.local" ]; then
107+
docker push {{ .Env.LOCAL_IMAGE_REGISTRY }}/cluster-api-runtime-extensions-helm-chart-bundle-initializer:v{{ trimprefix .Version "v" }}-{{ .Arch }}
108+
fi
99109
fi'
100-
101110
archives:
102111
- name_template: '{{ .ProjectName }}_v{{ trimprefix .Version "v" }}_{{ .Os }}_{{ .Arch }}'
103112
builds:

test/e2e/config/caren.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ managementClusterName: caren-e2e
66
images:
77
- name: ${LOCAL_IMAGE_REGISTRY}/cluster-api-runtime-extensions-nutanix:${E2E_IMAGE_TAG}
88
loadBehavior: mustLoad
9-
- name: ghcr.io/nutanix-cloud-native/cluster-api-runtime-extensions-helm-chart-bundle-initializer:${E2E_IMAGE_TAG}
9+
- name: ${LOCAL_IMAGE_REGISTRY}/cluster-api-runtime-extensions-helm-chart-bundle-initializer:${E2E_IMAGE_TAG}
1010
loadBehavior: mustLoad
1111

1212
providers:

0 commit comments

Comments
 (0)