From 8d7dba174179ee56abf95e92c6f7fe4f678efed9 Mon Sep 17 00:00:00 2001 From: lrangine <19699092+lokeshrangineni@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:07:38 -0500 Subject: [PATCH] Adding code to build the feast container image during the operator test run. Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> --- infra/feast-operator/Makefile | 6 ++++++ infra/feast-operator/test/e2e/e2e_test.go | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/infra/feast-operator/Makefile b/infra/feast-operator/Makefile index 54786eb5f1a..a7d0ee95e8e 100644 --- a/infra/feast-operator/Makefile +++ b/infra/feast-operator/Makefile @@ -144,6 +144,12 @@ run: manifests generate fmt vet ## Run a controller from your host. docker-build: ## Build docker image with the manager. $(CONTAINER_TOOL) build -t ${IMG} . +## Build feast docker image. +.PHONY: feast-docker-build +feast-image-build: + cd ./../.. && VERSION=operator.v0 REGISTRY=example.com make build-feature-transformation-server-docker + + .PHONY: docker-push docker-push: ## Push docker image with the manager. $(CONTAINER_TOOL) push ${IMG} diff --git a/infra/feast-operator/test/e2e/e2e_test.go b/infra/feast-operator/test/e2e/e2e_test.go index b46b3105d22..896ce3f4910 100644 --- a/infra/feast-operator/test/e2e/e2e_test.go +++ b/infra/feast-operator/test/e2e/e2e_test.go @@ -71,6 +71,16 @@ var _ = Describe("controller", Ordered, func() { err = utils.LoadImageToKindClusterWithName(projectimage) ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("building the feast image") + cmd = exec.Command("make", "feast-image-build") + _, err = utils.Run(cmd) + ExpectWithOffset(1, err).NotTo(HaveOccurred()) + + var feastImage = "example.com/feature-transformation-server:operator.v0" + By("loading the the feast image on Kind") + err = utils.LoadImageToKindClusterWithName(feastImage) + ExpectWithOffset(1, err).NotTo(HaveOccurred()) + By("installing CRDs") cmd = exec.Command("make", "install") _, err = utils.Run(cmd)