@@ -24,6 +24,11 @@ IMAGE_TAG := devel
2424endif
2525export IMAGE_TAG
2626
27+ CATALOGD_BINARIES =catalogd
28+ LINUX_BINARIES =$(join $(addprefix linux/,$(CATALOGD_BINARIES ) ) , )
29+
30+ BUILDCMD = go build -tags '$(GO_BUILD_TAGS ) ' -ldflags '$(GO_BUILD_LDFLAGS ) ' -gcflags '$(GO_BUILD_GCFLAGS ) ' -asmflags '$(GO_BUILD_ASMFLAGS ) ' -o $(BUILDBIN ) /$(notdir $@ ) ./cmd/$(notdir $@ )
31+
2732IMG := $(IMAGE_REPO ) :$(IMAGE_TAG )
2833CATALOGD_IMG := $(CATALOG_IMAGE_REPO ) :$(IMAGE_TAG )
2934
@@ -264,7 +269,7 @@ e2e-coverage:
264269.PHONY : kind-load
265270kind-load : $(KIND ) # EXHELP Loads the currently constructed images into the KIND cluster.
266271 $(CONTAINER_RUNTIME ) save $(IMG ) | $(KIND ) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME )
267- IMAGE_REPO= $( CATALOG_IMAGE_REPO ) KIND_CLUSTER_NAME= $( KIND_CLUSTER_NAME ) $( MAKE ) -f Makefile.catalogd kind-load
272+ $( CONTAINER_RUNTIME ) save $( CATALOGD_IMG ) | $( KIND ) load image-archive /dev/stdin --name $( KIND_CLUSTER_NAME )
268273
269274.PHONY : kind-deploy
270275kind-deploy : export MANIFEST := ./operator-controller.yaml
@@ -325,16 +330,17 @@ go-build-linux: export GOARCH=amd64
325330go-build-linux : $(BINARIES ) go-build-catalogd-linux
326331
327332.PHONY : run
328- run : docker-build kind-cluster kind-load-catalogd kind-load kind-deploy wait # HELP Build the operator-controller then deploy it into a new kind cluster.
333+ run : docker-build kind-cluster kind-load kind-deploy wait # HELP Build the operator-controller then deploy it into a new kind cluster.
329334
330335CATALOGD_NAMESPACE := olmv1-system
331336wait :
332337 kubectl wait --for=condition=Available --namespace=$(CATALOGD_NAMESPACE ) deployment/catalogd-controller-manager --timeout=60s
333338 kubectl wait --for=condition=Ready --namespace=$(CATALOGD_NAMESPACE ) certificate/catalogd-service-cert # Avoid upgrade test flakes when reissuing cert
334339
335340.PHONY : docker-build
336- docker-build : build-linux build-catalogd-container # EXHELP Build docker image for operator-controller and catalog with GOOS=linux and local GOARCH.
341+ docker-build : build-linux # EXHELP Build docker image for operator-controller and catalog with GOOS=linux and local GOARCH.
337342 $(CONTAINER_RUNTIME ) build -t $(IMG ) -f Dockerfile ./bin/linux
343+ $(CONTAINER_RUNTIME ) build -f Dockerfile.catalogd -t $(CATALOGD_IMG ) ./bin/linux
338344
339345# SECTION Release
340346ifeq ($(origin ENABLE_RELEASE_PIPELINE ) , undefined)
@@ -349,7 +355,7 @@ export GORELEASER_ARGS
349355
350356.PHONY : release
351357release : $(GORELEASER ) # EXHELP Runs goreleaser for the operator-controller. By default, this will run only as a snapshot and will not publish any artifacts unless it is run with different arguments. To override the arguments, run with "GORELEASER_ARGS=...". When run as a github action from a tag, this target will publish a full release.
352- OPERATOR_CONTROLLER_IMAGE_REPO=$(IMAGE_REPO ) CATALOGD_IMAGE_REPO =$(CATALOG_IMAGE_REPO ) $(GORELEASER ) $(GORELEASER_ARGS )
358+ OPERATOR_CONTROLLER_IMAGE_REPO=$(IMAGE_REPO ) CATALOG_IMAGE_REPO =$(CATALOG_IMAGE_REPO ) $(GORELEASER ) $(GORELEASER_ARGS )
353359
354360.PHONY : quickstart
355361quickstart : export MANIFEST := https://github.com/operator-framework/operator-controller/releases/download/$(VERSION ) /operator-controller.yaml
@@ -392,23 +398,6 @@ demo-update:
392398 ./hack/demo/generate-asciidemo.sh -u -n catalogd-demo catalogd-demo-script.sh
393399
394400# Catalogd targets
395- ifeq ($(origin CATALOGD_IMAGE_REPO ) , undefined)
396- CATALOGD_IMAGE_REPO := quay.io/operator-framework/catalogd
397- endif
398- export CATALOGD_IMAGE_REPO
399-
400- ifeq ($(origin CATALOGD_IMAGE_TAG ) , undefined)
401- CATALOGD_IMAGE_TAG := devel
402- endif
403- export CATALOGD_IMAGE_TAG
404-
405- CATALOGD_IMAGE := $(CATALOGD_IMAGE_REPO ) :$(CATALOGD_IMAGE_TAG )
406-
407- CATALOGD_BINARIES =catalogd
408- LINUX_BINARIES =$(join $(addprefix linux/,$(CATALOGD_BINARIES ) ) , )
409-
410- BUILDCMD = go build -tags '$(GO_BUILD_TAGS ) ' -ldflags '$(GO_BUILD_LDFLAGS ) ' -gcflags '$(GO_BUILD_GCFLAGS ) ' -asmflags '$(GO_BUILD_ASMFLAGS ) ' -o $(BUILDBIN ) /$(notdir $@ ) ./cmd/$(notdir $@ )
411-
412401.PHONY : catalogd-build go-build-catalogd-local $(CATALOGD_BINARIES )
413402catalogd-build : go-build-catalogd-local # # Build binaries for current GOOS and GOARCH.
414403go-build-catalogd-local : $(CATALOGD_BINARIES )
@@ -423,12 +412,4 @@ $(LINUX_BINARIES): BUILDBIN = bin/linux
423412$(LINUX_BINARIES ) :
424413 GOOS=linux $(BUILDCMD )
425414
426- .PHONY : build-catalogd-container
427- build-catalogd-container : catalogd-build-linux # # Build docker image for catalogd.
428- $(CONTAINER_RUNTIME ) build -f Dockerfile.catalogd -t $(CATALOGD_IMAGE ) ./bin/linux
429-
430- .PHONY : kind-load-catalogd
431- kind-load-catalogd : $(KIND ) # # Load the built images onto the local cluster
432- $(CONTAINER_RUNTIME ) save $(CATALOGD_IMAGE ) | $(KIND ) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME )
433-
434415include Makefile.venv
0 commit comments