Skip to content

Commit

Permalink
chore: update image tag and add commands to of Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
evelynwei committed Dec 18, 2024
1 parent cb0a6c8 commit 355315d
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ ORG = polarismesh
REPO = polaris-controller
SIDECAR_INIT_REPO = polaris-sidecar-init
ENVOY_SIDECAR_INIT_REPO = polaris-envoy-bootstrap-generator
IMAGE_TAG = v1.7.1
IMAGE_TAG = v1.7.2
PLATFORMS = linux/amd64,linux/arm64

.PHONY: all
all: build-amd64 build-arm64 build-multi-arch-image \
all: fmt build-amd64 build-arm64 build-multi-arch-image \
build-sidecar-init build-envoy-sidecar-init push-image

.PHONY: build-amd64
Expand Down Expand Up @@ -49,3 +49,20 @@ clean:
rm -rf bin
rm -rf polaris-controller-release*

.PHONY: fmt
fmt: ## Run go fmt against code.
go fmt ./...

.PHONY: generate-multi-arch-image
generate-multi-arch-image: fmt build-amd64 build-arm64
@echo "------------------"
@echo "--> Generate multi-arch docker image to registry for polaris-controller"
@echo "------------------"
@docker buildx build -f ./docker/Dockerfile --tag $(ORG)/$(REPO):$(IMAGE_TAG) --platform $(PLATFORMS) ./

.PHONY: push-multi-arch-image
push-multi-arch-image: generate-multi-arch-image
@echo "------------------"
@echo "--> Push multi-arch docker image to registry for polaris-controller"
@echo "------------------"
@docker image push $(ORG)/$(REPO):$(IMAGE_TAG) --platform $(PLATFORMS)

0 comments on commit 355315d

Please sign in to comment.