Skip to content

Commit bc57546

Browse files
committed
Makefile: Split build image tasks for better modularity
Refactored the build-images target to explicitly split the build process into two separate tasks: build-bpfman-operator-image and build-bpfman-agent-image. This change is aimed at improving day-to-day development workflow. Signed-off-by: Andrew McDermott <[email protected]>
1 parent c686cd1 commit bc57546

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,10 @@ $(shell mkdir -p $(LOCAL_GOCACHE_PATH))
330330
endif
331331

332332
.PHONY: build-images
333-
build-images: ## Build bpfman-agent and bpfman-operator images.
333+
build-images: build-operator-image build-agent-image ## Build bpfman-agent and bpfman-operator images.
334+
335+
.PHONY: build-operator-image
336+
build-operator-image: ## Build bpfman-operator image.
334337
$(if $(filter $(OCI_BIN),podman), \
335338
@echo "Adding GOCACHE volume mount $(LOCAL_GOCACHE_PATH):$(CONTAINER_GOCACHE_PATH).")
336339
$(OCI_BIN) version
@@ -340,6 +343,9 @@ build-images: ## Build bpfman-agent and bpfman-operator images.
340343
--build-arg BUILDPLATFORM=linux/amd64 \
341344
$(if $(filter $(OCI_BIN),podman),--volume "$(LOCAL_GOCACHE_PATH):$(CONTAINER_GOCACHE_PATH):z") \
342345
-f Containerfile.bpfman-operator .
346+
347+
.PHONY: build-agent-image
348+
build-agent-image: ## Build bpfman-agent image.
343349
$(OCI_BIN) buildx build --load -t ${BPFMAN_AGENT_IMG} \
344350
--build-arg TARGETPLATFORM=linux/$(GOARCH) \
345351
--build-arg TARGETARCH=$(GOARCH) \

0 commit comments

Comments
 (0)