Skip to content

Commit

Permalink
Adds Makefile target to build kueue-viz images (#3849)
Browse files Browse the repository at this point in the history
  • Loading branch information
akram authored Dec 18, 2024
1 parent 51eab28 commit 88d83ff
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GIT_TAG ?= $(shell git describe --tags --dirty --always)
# Image URL to use all building/pushing image targets
PLATFORMS ?= linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
CLI_PLATFORMS ?= linux/amd64,linux/arm64,darwin/amd64,darwin/arm64
VIZ_PLATFORMS ?= linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
DOCKER_BUILDX_CMD ?= docker buildx
IMAGE_BUILD_CMD ?= $(DOCKER_BUILDX_CMD) build
IMAGE_BUILD_EXTRA_OPTS ?=
Expand Down Expand Up @@ -330,6 +331,36 @@ importer-image: PLATFORMS=linux/amd64
importer-image: PUSH=--load
importer-image: importer-image-build


# Build the kueue-viz dashboard images (frontend and backend)
.PHONY: kueue-viz-image-build
kueue-viz-image-build:
$(IMAGE_BUILD_CMD) \
-t $(IMAGE_REGISTRY)/kueue-viz-backend:$(GIT_TAG) \
-t $(IMAGE_REGISTRY)/kueue-viz-backend:$(RELEASE_BRANCH)-latest \
--platform=$(VIZ_PLATFORMS) \
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
--build-arg BUILDER_IMAGE=$(BUILDER_IMAGE) \
--build-arg CGO_ENABLED=$(CGO_ENABLED) \
$(PUSH) \
-f ./cmd/experimental/kueue-viz/backend/Dockerfile ./cmd/experimental/kueue-viz/backend; \
$(IMAGE_BUILD_CMD) \
-t $(IMAGE_REGISTRY)/kueue-viz-frontend:$(GIT_TAG) \
-t $(IMAGE_REGISTRY)/kueue-viz-frontend:$(RELEASE_BRANCH)-latest \
--platform=$(VIZ_PLATFORMS) \
$(PUSH) \
-f ./cmd/experimental/kueue-viz/frontend/Dockerfile ./cmd/experimental/kueue-viz/frontend; \

.PHONY: kueue-viz-image-push
kueue-viz-image-push: PUSH=--push
kueue-viz-image-push: kueue-viz-image-build

# Build a docker local us-central1-docker.pkg.dev/k8s-staging-images/kueue/kueue-viz image
.PHONY: kueue-viz-image
kueue-viz-image: PUSH=--load
kueue-viz-image: kueue-viz-image-build


.PHONY: kueuectl
kueuectl:
CGO_ENABLED=$(CGO_ENABLED) $(GO_BUILD_ENV) $(GO_CMD) build -ldflags="$(LD_FLAGS)" -o $(PROJECT_DIR)/bin/kubectl-kueue cmd/kueuectl/main.go
Expand Down
1 change: 1 addition & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ steps:
- debug-image-push
- importer-image-push
- helm-chart-push
- kueue-viz-image-push
env:
- IMAGE_REGISTRY=us-central1-docker.pkg.dev/k8s-staging-images/kueue
- GIT_TAG=$_GIT_TAG
Expand Down

0 comments on commit 88d83ff

Please sign in to comment.