Skip to content

Commit eb5d5e6

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

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

Diff for: .goreleaser.yml

+12-3
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:

Diff for: test/e2e/config/caren.yaml

+2-2
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:
@@ -211,7 +211,7 @@ variables:
211211
# DOCKER_HUB_PASSWORD: ""
212212

213213
intervals:
214-
default/wait-controllers: ["3m", "10s"]
214+
default/wait-controllers: ["10m", "10s"]
215215
default/wait-cluster: ["10m", "10s"]
216216
default/wait-control-plane: ["10m", "10s"]
217217
default/wait-worker-nodes: ["10m", "10s"]

Diff for: test/e2e/self_hosted_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,10 @@ var _ = Describe("Self-hosted", Serial, func() {
116116
WaitForAddonsToBeReadyInWorkloadCluster(
117117
ctx,
118118
WaitForAddonsToBeReadyInWorkloadClusterInput{
119-
AddonsConfig: addonsConfig,
120-
ClusterProxy: proxy,
121-
WorkloadCluster: workloadCluster,
119+
AddonsConfig: addonsConfig,
120+
ClusterProxy: proxy,
121+
WorkloadCluster: workloadCluster,
122+
InfrastructureProvider: lowercaseProvider,
122123
DeploymentIntervals: e2eConfig.GetIntervals(
123124
flavour,
124125
"wait-deployment",

0 commit comments

Comments
 (0)