diff --git a/build_deploy.sh b/build_deploy.sh index 1f1f278b..82ff7c2f 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -39,4 +39,5 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then fi #### End +docker buildx use multiarchbuilder docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index f7831fe9..cb1df411 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -351,15 +351,21 @@ var _ = ginkgo.Describe("Frontend controller with service", func() { if err != nil { return false } - gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady)) - gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue)) - gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed)) - gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse)) - gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful)) - gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue)) - gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true)) - return true + + // Check the length of Conditions slice before accessing by index + if len(nfe.Status.Conditions) > 2 { + gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady)) + gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue)) + gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed)) + gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse)) + gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful)) + gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue)) + gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true)) + return true + } + return false }, timeout, interval).Should(gomega.BeTrue()) + }) }) }) diff --git a/pr_check.sh b/pr_check.sh index f91f0cbd..c402ce6e 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,6 +14,7 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it +docker buildx use multiarchbuilder docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . docker buildx build --load -t $CONTAINER_NAME -f build/Dockerfile.pr .