Skip to content

Commit ff6f5d5

Browse files
committed
Add makefile and cloudbuild file to build and push lora-syncer
Signed-off-by: Kunjan <[email protected]>
1 parent 310c5a8 commit ff6f5d5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Makefile

+29
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ IMAGE_NAME := epp
3131
IMAGE_REPO ?= $(IMAGE_REGISTRY)/$(IMAGE_NAME)
3232
IMAGE_TAG ?= $(IMAGE_REPO):$(GIT_TAG)
3333

34+
SYNCER_IMAGE_NAME := lora-syncer
35+
SYNCER_IMAGE_REPO ?= $(IMAGE_REGISTRY)/$(IMAGE_NAME)
36+
SYNCER_IMAGE_TAG ?= $(IMAGE_REPO):$(GIT_TAG)
37+
3438
BASE_IMAGE ?= gcr.io/distroless/base-debian10
3539
BUILDER_IMAGE ?= golang:1.23-alpine
3640
ifdef GO_VERSION
@@ -154,6 +158,31 @@ image-build:
154158
image-push: PUSH=--push
155159
image-push: image-build
156160

161+
##@ Lora Syncer
162+
163+
.PHONY: syncer-image-local-build
164+
syncer-image-local-build:
165+
BUILDER=$(shell $(DOCKER_BUILDX_CMD) create --use)
166+
$(MAKE) image-build PUSH=$(PUSH)
167+
$(DOCKER_BUILDX_CMD) rm $$BUILDER
168+
169+
.PHONY: syncer-image-local-push
170+
syncer-image-local-push: PUSH=--push
171+
syncer-image-local-push: image-local-build
172+
173+
.PHONY: syncer-image-build
174+
syncer-image-build:
175+
$ cd $(CURDIR)/tools/dynamic-lora-sidecar && $(IMAGE_BUILD_CMD) -t $(SYNCER_IMAGE_TAG) \
176+
--platform=$(PLATFORMS) \
177+
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
178+
--build-arg BUILDER_IMAGE=$(BUILDER_IMAGE) \
179+
$(PUSH) \
180+
$(IMAGE_BUILD_EXTRA_OPTS) ./
181+
182+
.PHONY: syncer-image-push
183+
syncer-image-push: PUSH=--push
184+
syncer-image-push: image-build
185+
157186
##@ Docs
158187

159188
.PHONY: build-docs

0 commit comments

Comments
 (0)