Skip to content

Commit

Permalink
chore: clean up build cmds for workspace (#668)
Browse files Browse the repository at this point in the history
**Reason for Change**:
Kaito now includes both workspace and ragengine controllers, this change
cleans up the makefile for building workspace images.
  • Loading branch information
Fei-Guo authored and zhuangqh committed Nov 15, 2024
1 parent b71ea7e commit ddc3a36
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
if: ${{ !inputs.isRelease }}
shell: bash
run: |
make docker-build-kaito
make docker-build-workspace
env:
REGISTRY: ${{ env.REGISTRY }}
VERSION: ${{ env.VERSION }}
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
if: ${{ !inputs.isRelease }}
shell: bash
run: |
make docker-build-kaito
make docker-build-workspace
env:
REGISTRY: ${{ env.REGISTRY }}
VERSION: ${{ env.VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-gh-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:

- name: Build image
run: |
OUTPUT_TYPE=type=registry make docker-build-kaito
OUTPUT_TYPE=type=registry make docker-build-workspace
env:
VERSION: ${{ needs.check-tag.outputs.tag }}
REGISTRY: ${{ steps.get-registry.outputs.registry_repository }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-mcr-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: 'Build and Publish to MCR'
id: Publish
run: |
OUTPUT_TYPE=type=registry make docker-build-kaito
OUTPUT_TYPE=type=registry make docker-build-workspace
env:
VERSION: ${{ needs.get-tag.outputs.release-tag }}
REGISTRY: ${{ secrets.KAITO_MCR_REGISTRY }}/public/aks/kaito
Expand Down
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ OUTPUT_TYPE ?= type=registry
QEMU_VERSION ?= 7.2.0-1
ARCH ?= amd64,arm64


.PHONY: docker-buildx
docker-buildx: ## Build and push docker image for the manager for cross-platform support
@if ! docker buildx ls | grep $(BUILDX_BUILDER_NAME); then \
Expand All @@ -177,10 +178,10 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
docker buildx inspect $(BUILDX_BUILDER_NAME) --bootstrap; \
fi

.PHONY: docker-build-kaito
docker-build-kaito: docker-buildx
.PHONY: docker-build-workspace
docker-build-workspace: docker-buildx
docker buildx build \
--file ./docker/kaito/Dockerfile \
--file ./docker/workspace/Dockerfile \
--output=$(OUTPUT_TYPE) \
--platform="linux/$(ARCH)" \
--pull \
Expand Down Expand Up @@ -287,12 +288,12 @@ azure-karpenter-helm: ## Update Azure client env vars and settings in helm valu
kubectl wait --for=condition=available deploy "karpenter" -n karpenter --timeout=300s

##@ Build
.PHONY: build
build: manifests generate fmt vet ## Build manager binary.
go build -o bin/manager cmd/*.go
.PHONY: build-workspace
build-workspace: manifests generate fmt vet ## Build manager binary.
go build -o bin/workspace-manager cmd/*.go

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
.PHONY: run-workspace
run-workspace: manifests generate fmt vet ## Run a controller from your host.
go run ./cmd/main.go

##@ Build Dependencies
Expand Down
File renamed without changes.

0 comments on commit ddc3a36

Please sign in to comment.