@@ -18,6 +18,9 @@ SIDECAR_IMAGE_TAG_BASE ?= $(IMAGE_REGISTRY)/$(SIDECAR_IMAGE_NAME)
1818SIDECAR_IMG = $(SIDECAR_IMAGE_TAG_BASE ) :$(SIDECAR_TAG )
1919NAMESPACE ?= hc4ai-operator
2020
21+ ACTIVATOR_IMAGE_TAG_BASE ?= $(IMAGE_REGISTRY ) /$(PROJECT_NAME ) -activator
22+ ACTIVATOR_IMG = $(ACTIVATOR_IMAGE_TAG_BASE ) :$(EPP_TAG )
23+
2124# Map go arch to typos arch
2225ifeq ($(TARGETARCH ) ,amd64)
2326TYPOS_TARGET_ARCH = x86_64
@@ -137,6 +140,14 @@ build-%: check-go install-dependencies download-tokenizer ## Build the project
137140 @printf " \033[33;1m==== Building ====\033[0m\n"
138141 go build $($* _LDFLAGS) -o bin/$($* _NAME) cmd/$($* _NAME) /main.go
139142
143+ # #@ Build Activator
144+
145+ .PHONY : activator-build
146+ activator-build : check-go install-dependencies download-tokenizer # # Build the project
147+ @printf " \033[33;1m==== Building ====\033[0m\n"
148+ go build -ldflags=" $( LDFLAGS) " -o bin/activator cmd/activator/main.go
149+
150+
140151# #@ Container Build/Push
141152
142153.PHONY : image-build
@@ -161,6 +172,22 @@ image-push-%: check-container-tool load-version-json ## Push Docker image to reg
161172 @printf " \033[33;1m==== Pushing Docker image $( $* _IMAGE) ====\033[0m\n"
162173 $(CONTAINER_TOOL ) push $($* _IMAGE)
163174
175+ .PHONY : activator-image-build
176+ activator-image-build : # # Build the activator image using Docker Buildx.
177+ $(CONTAINER_TOOL ) build \
178+ --platform linux/$(TARGETARCH ) \
179+ --build-arg TARGETOS=linux \
180+ --build-arg TARGETARCH=${TARGETARCH} \
181+ --build-arg COMMIT_SHA=${GIT_COMMIT_SHA} \
182+ --build-arg BUILD_REF=${BUILD_REF} \
183+ -t $(ACTIVATOR_IMG ) \
184+ -f Dockerfile.activator .
185+
186+ .PHONY : activator-image-push
187+ activator-image-push : check-container-tool load-version-json # # Push Activator Docker image $(ACTIVATOR_IMG) to registry
188+ @printf " \033[33;1m==== Pushing Activator Docker image $( ACTIVATOR_IMG) ====\033[0m\n"
189+ $(CONTAINER_TOOL ) push $(ACTIVATOR_IMG )
190+
164191# #@ Install/Uninstall Targets
165192
166193# Default install/uninstall (Docker)
@@ -277,7 +304,7 @@ check-typos: $(TYPOS) ## Check for spelling errors using typos (exits with error
277304 echo " $$ TYPOS_OUTPUT" ; \
278305 exit 1; \
279306 fi
280-
307+
281308# #@ Tools
282309
283310.PHONY : check-tools
0 commit comments