Skip to content

Commit 4e394ac

Browse files
author
Per Goncalves da Silva
committed
Update Makefile to build test-operator controllers
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 951e630 commit 4e394ac

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,21 @@ test-unit: $(SETUP_ENVTEST) envtest-k8s-bins #HELP Run the unit tests
246246
$(UNIT_TEST_DIRS) \
247247
-test.gocoverdir=$(COVERAGE_UNIT_DIR)
248248

249+
250+
TEST_OPERATOR_CONTROLLERS=v1.0.0 v2.0.0
251+
252+
.PHONY: $(TEST_OPERATOR_CONTROLLERS)
253+
$(TEST_OPERATOR_CONTROLLERS):
254+
go build $(GO_BUILD_FLAGS) $(GO_BUILD_EXTRA_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o ./testdata/images/controllers/test-operator/$@/manager ./test/test-operator/$@/cmd/main.go
255+
256+
.PHONY: test-operator-controllers
257+
test-operator-controllers: $(TEST_OPERATOR_CONTROLLERS)
258+
249259
.PHONY: image-registry
250260
E2E_REGISTRY_IMAGE=localhost/e2e-test-registry:devel
251261
image-registry: export GOOS=linux
252262
image-registry: export GOARCH=amd64
253-
image-registry: ## Build the testdata catalog used for e2e tests and push it to the image registry
263+
image-registry: $(TEST_OPERATOR_CONTROLLERS) ## Build the testdata catalog used for e2e tests and push it to the image registry
254264
go build $(GO_BUILD_FLAGS) $(GO_BUILD_EXTRA_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o ./testdata/registry/bin/registry ./testdata/registry/registry.go
255265
go build $(GO_BUILD_FLAGS) $(GO_BUILD_EXTRA_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o ./testdata/push/bin/push ./testdata/push/push.go
256266
$(CONTAINER_RUNTIME) build -f ./testdata/Dockerfile -t $(E2E_REGISTRY_IMAGE) ./testdata

0 commit comments

Comments
 (0)