From 747648194fc0f91f5d7c1eb3dd58f9d8d9f10ca5 Mon Sep 17 00:00:00 2001 From: Shalin Patel Date: Wed, 4 Dec 2024 16:18:53 -0800 Subject: [PATCH] test: create helm-chart-bundle-initializer image for e2e tests --- .github/workflows/checks.yml | 4 ++-- .goreleaser.yml | 15 ++++++++++++--- test/e2e/config/caren.yaml | 4 ++-- test/e2e/self_hosted_test.go | 7 ++++--- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 7db12b090..c691d2f8f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -96,8 +96,8 @@ jobs: matrix: config: - {"provider": "Docker", "kubernetesVersion": "v1.29.9"} - # - {"provider": "Docker", "kubernetesVersion": "v1.30.6"} - # - {"provider": "Docker", "kubernetesVersion": "v1.31.2"} + - {"provider": "Docker", "kubernetesVersion": "v1.30.6"} + - {"provider": "Docker", "kubernetesVersion": "v1.31.2"} - {"provider": "Nutanix", "kubernetesVersion": "v1.30.5", "osImage": "nkp-rocky-9.4-release-1.30.5-20240930171619"} # - {"provider": "AWS", "kubernetesVersion": "v1.29.6"} fail-fast: false diff --git a/.goreleaser.yml b/.goreleaser.yml index 3bb2159a4..36cd933ff 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -44,8 +44,9 @@ before: $(helm template {{ .ProjectName }} ./charts/{{ .ProjectName }} \ --namespace caren-system \ --set-string image.tag=v{{ trimprefix .Version "v" }}{{ if .IsSnapshot }}-{{ .Runtime.Goarch }}{{ end }} \ - --set-string helmRepository.images.bundleInitializer.tag=v{{ trimprefix .Version "v" }}{{ if .IsSnapshot }}-{{ .Runtime.Goarch }} \ - --set-string image.repository={{ .Env.LOCAL_IMAGE_REGISTRY }}/{{ .ProjectName }}{{ end }} \ + --set-string helmRepository.images.bundleInitializer.tag=v{{ trimprefix .Version "v" }}{{ if .IsSnapshot }}-{{ .Runtime.Goarch }}{{ end }} \ + {{ if .IsSnapshot }}--set-string image.repository={{ .Env.LOCAL_IMAGE_REGISTRY }}/{{ .ProjectName }}{{ end }} \ + {{ if .IsSnapshot }}--set-string helmRepository.images.bundleInitializer.repository={{ .Env.LOCAL_IMAGE_REGISTRY }}/cluster-api-runtime-extensions-helm-chart-bundle-initializer{{ end }} \ ) EOF' - 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: --platform linux/{{ .Arch }} \ -t v{{ trimprefix .Version "v" }}-{{ .Arch }} \ ./cmd + docker buildx build \ + --platform linux/{{ .Arch }} \ + -t {{ .Env.LOCAL_IMAGE_REGISTRY }}/cluster-api-runtime-extensions-helm-chart-bundle-initializer:v{{ trimprefix .Version "v" }}-{{ .Arch }} \ + -f ./hack/addons/helm-chart-bundler/Dockerfile \ + --load \ + . + if [ {{ .Env.LOCAL_IMAGE_REGISTRY }} != "ko.local" ]; then + docker push {{ .Env.LOCAL_IMAGE_REGISTRY }}/cluster-api-runtime-extensions-helm-chart-bundle-initializer:v{{ trimprefix .Version "v" }}-{{ .Arch }} + fi fi' - archives: - name_template: '{{ .ProjectName }}_v{{ trimprefix .Version "v" }}_{{ .Os }}_{{ .Arch }}' builds: diff --git a/test/e2e/config/caren.yaml b/test/e2e/config/caren.yaml index 4a1f54963..eaba1f520 100644 --- a/test/e2e/config/caren.yaml +++ b/test/e2e/config/caren.yaml @@ -6,7 +6,7 @@ managementClusterName: caren-e2e images: - name: ${LOCAL_IMAGE_REGISTRY}/cluster-api-runtime-extensions-nutanix:${E2E_IMAGE_TAG} loadBehavior: mustLoad - - name: ghcr.io/nutanix-cloud-native/cluster-api-runtime-extensions-helm-chart-bundle-initializer:${E2E_IMAGE_TAG} + - name: ${LOCAL_IMAGE_REGISTRY}/cluster-api-runtime-extensions-helm-chart-bundle-initializer:${E2E_IMAGE_TAG} loadBehavior: mustLoad providers: @@ -211,7 +211,7 @@ variables: # DOCKER_HUB_PASSWORD: "" intervals: - default/wait-controllers: ["3m", "10s"] + default/wait-controllers: ["10m", "10s"] default/wait-cluster: ["10m", "10s"] default/wait-control-plane: ["10m", "10s"] default/wait-worker-nodes: ["10m", "10s"] diff --git a/test/e2e/self_hosted_test.go b/test/e2e/self_hosted_test.go index 6f38e23df..8a01ccfb6 100644 --- a/test/e2e/self_hosted_test.go +++ b/test/e2e/self_hosted_test.go @@ -116,9 +116,10 @@ var _ = Describe("Self-hosted", Serial, func() { WaitForAddonsToBeReadyInWorkloadCluster( ctx, WaitForAddonsToBeReadyInWorkloadClusterInput{ - AddonsConfig: addonsConfig, - ClusterProxy: proxy, - WorkloadCluster: workloadCluster, + AddonsConfig: addonsConfig, + ClusterProxy: proxy, + WorkloadCluster: workloadCluster, + InfrastructureProvider: lowercaseProvider, DeploymentIntervals: e2eConfig.GetIntervals( flavour, "wait-deployment",