diff --git a/.github/actions/initialize-environment/action.yaml b/.github/actions/initialize-environment/action.yaml index af229dbfa..eb7c67ebd 100644 --- a/.github/actions/initialize-environment/action.yaml +++ b/.github/actions/initialize-environment/action.yaml @@ -5,10 +5,6 @@ description: Initialization steps for kagent actions runs: using: "composite" steps: - - name: Cancel Previous Actions - uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1 - with: - access_token: ${{ github.token }} - name: Free disk space shell: bash run: | diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9cd01495f..d196ec58a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,6 +22,7 @@ env: # Consistent builder configuration BUILDX_BUILDER_NAME: kagent-builder-v0.23.0 BUILDX_VERSION: v0.23.0 + BUILD_PLATFORMS: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }} jobs: setup: runs-on: ubuntu-latest @@ -84,15 +85,13 @@ jobs: BUILDX_BUILDER_NAME: ${{ env.BUILDX_BUILDER_NAME }} KAGENT_HELM_EXTRA_ARGS: --cleanup-on-fail=false DOCKER_BUILD_ARGS: >- - --cache-from=type=gha,scope=${{ needs.setup.outputs.cache-key }}-e2e - --cache-from=type=gha,scope=${{ env.CACHE_KEY_PREFIX }}-main-e2e - --cache-to=type=gha,scope=${{ needs.setup.outputs.cache-key }}-e2e,mode=max --platform=linux/amd64 --push + CI_CACHE_KEY_PREFIX: ${{ needs.setup.outputs.cache-key }}-e2e + CI_CACHE_MAIN_KEY_PREFIX: ${{ env.CACHE_KEY_PREFIX }}-main run: | echo "Cache key: ${{ needs.setup.outputs.cache-key }}" - make helm-install - make push-test-agent push-test-skill + make -j2 ci-e2e-install kubectl rollout status deployment/kagent-controller -n kagent --timeout=120s kubectl wait --for=condition=Ready pod -l app.kubernetes.io/component=controller -n kagent --timeout=120s kubectl wait --for=condition=Ready agents.kagent.dev -n kagent --all --timeout=60s || kubectl get po -n kagent -o wide ||: @@ -121,6 +120,7 @@ jobs: OPENAI_API_KEY: fake KAGENT_HELM_EXTRA_ARGS: >- --set 'rbac.namespaces={kagent}' + --set ui.replicas=0 run: | # Upgrade helm to use namespace-scoped RBAC make helm-install-provider @@ -202,10 +202,10 @@ jobs: BUILDX_BUILDER_NAME: ${{ env.BUILDX_BUILDER_NAME }} KAGENT_HELM_EXTRA_ARGS: --cleanup-on-fail=false DOCKER_BUILD_ARGS: >- - --cache-from=type=gha,scope=${{ needs.setup.outputs.cache-key }}-e2e - --cache-from=type=gha,scope=${{ env.CACHE_KEY_PREFIX }}-main-e2e --platform=linux/amd64 --push + CI_CACHE_KEY_PREFIX: ${{ needs.setup.outputs.cache-key }}-upgrade + CI_CACHE_MAIN_KEY_PREFIX: ${{ env.CACHE_KEY_PREFIX }}-main run: | make run-upgrade-tests UPGRADE_FROM_VERSION="${{ steps.prep.outputs.version }}" - name: fail print info @@ -251,10 +251,10 @@ jobs: BUILDX_BUILDER_NAME: ${{ env.BUILDX_BUILDER_NAME }} KAGENT_HELM_EXTRA_ARGS: --cleanup-on-fail=false DOCKER_BUILD_ARGS: >- - --cache-from=type=gha,scope=${{ needs.setup.outputs.cache-key }}-e2e - --cache-from=type=gha,scope=${{ env.CACHE_KEY_PREFIX }}-main-e2e --platform=linux/amd64 --push + CI_CACHE_KEY_PREFIX: ${{ needs.setup.outputs.cache-key }}-rolling-upgrade + CI_CACHE_MAIN_KEY_PREFIX: ${{ env.CACHE_KEY_PREFIX }}-main run: | make run-rolling-upgrade-tests UPGRADE_FROM_VERSION="${{ steps.prep.outputs.version }}" - name: fail print info @@ -351,7 +351,8 @@ jobs: working-directory: ./ui run: npm run test:vitest - # This job builds the Docker images for the controller, UI, app, and CLI on arm64. + # The controller target also builds its runtime and sandbox image dependencies. + # Pull requests validate amd64; main and release pushes validate both platforms. build: needs: setup env: @@ -361,13 +362,7 @@ jobs: image: - controller - ui - - app - - cli - - golang-adk - - golang-adk-full - skills-init - - acp-sandbox-hermes - - acp-sandbox-openclaw - acp-sandbox-claude runs-on: ubuntu-latest services: @@ -379,14 +374,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 - name: Set up QEMU + if: contains(env.BUILD_PLATFORMS, 'linux/arm64') uses: docker/setup-qemu-action@v4 with: - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.BUILD_PLATFORMS }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 with: name: ${{ env.BUILDX_BUILDER_NAME }} - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.BUILD_PLATFORMS }} version: ${{ env.BUILDX_VERSION }} use: "true" driver-opts: network=host @@ -394,16 +390,31 @@ jobs: env: BUILDX_BUILDER_NAME: ${{ env.BUILDX_BUILDER_NAME }} DOCKER_BUILD_ARGS: >- - --cache-from=type=gha,scope=${{ needs.setup.outputs.cache-key }}-${{ matrix.image }} - --cache-from=type=gha,scope=${{ env.CACHE_KEY_PREFIX }}-main-${{ matrix.image }} - --cache-to=type=gha,scope=${{ needs.setup.outputs.cache-key }}-${{ matrix.image }},mode=max - --platform=linux/amd64,linux/arm64 + --platform=${{ env.BUILD_PLATFORMS }} --push + CI_CACHE_KEY_PREFIX: ${{ needs.setup.outputs.cache-key }} + CI_CACHE_MAIN_KEY_PREFIX: ${{ env.CACHE_KEY_PREFIX }}-main DOCKER_REPO: "${{ github.repository_owner }}/kagent" DOCKER_BUILDER: "docker buildx build" run: make build-${{ matrix.image }} working-directory: ./ + cli-build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Set up Go + uses: actions/setup-go@v7 + with: + go-version-file: go/go.mod + cache: true + cache-dependency-path: go/go.sum + + - name: Build CLI binaries + run: make -C go -j5 build + go-lint: runs-on: ubuntu-latest steps: diff --git a/Makefile b/Makefile index 509ad57e8..cf2408f38 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,15 @@ BUILDKIT_VERSION = v0.23.0 BUILDX_NO_DEFAULT_ATTESTATIONS=1 BUILDX_BUILDER_NAME ?= kagent-builder-$(BUILDKIT_VERSION) +# CI sets these prefixes to share BuildKit layers per image across jobs without +# letting one image's cache export overwrite another's. +CI_CACHE_KEY_PREFIX ?= +CI_CACHE_MAIN_KEY_PREFIX ?= +comma := , +define docker-cache-args +$(if $(CI_CACHE_KEY_PREFIX),--cache-from=type=gha$(comma)scope=$(CI_CACHE_KEY_PREFIX)-$(1)) $(if $(CI_CACHE_MAIN_KEY_PREFIX),--cache-from=type=gha$(comma)scope=$(CI_CACHE_MAIN_KEY_PREFIX)-$(1)) $(if $(CI_CACHE_KEY_PREFIX),--cache-to=type=gha$(comma)scope=$(CI_CACHE_KEY_PREFIX)-$(1)$(comma)mode=max) +endef + ifeq ($(CONTAINER_RUNTIME),podman) DOCKER_BUILDER ?= $(CONTAINER_RUNTIME) build DOCKER_BUILD_ARGS ?= --platform linux/$(LOCALARCH) @@ -84,6 +93,7 @@ ACP_SANDBOX_BASE_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(ACP_SANDBOX_BASE_IMA ACP_SANDBOX_HERMES_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(ACP_SANDBOX_HERMES_IMAGE_NAME):$(ACP_SANDBOX_IMAGE_TAG) ACP_SANDBOX_OPENCLAW_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(ACP_SANDBOX_OPENCLAW_IMAGE_NAME):$(ACP_SANDBOX_IMAGE_TAG) ACP_SANDBOX_CLAUDE_IMG ?= $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(ACP_SANDBOX_CLAUDE_IMAGE_NAME):$(ACP_SANDBOX_IMAGE_TAG) +E2E_PLACEHOLDER_DIGEST ?= sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee #take from go/go.mod AWK ?= $(shell command -v gawk || command -v awk) @@ -279,57 +289,81 @@ build-controller: buildx-create controller-manifests build-app build-app-full bu ACP_SANDBOX_HERMES_IMG=$(ACP_SANDBOX_HERMES_IMG) \ ./scripts/controller-digest-ldflags.sh); \ $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) \ + $(call docker-cache-args,controller) \ + --build-arg LDFLAGS="$(LDFLAGS)$$DIGEST_LDFLAGS" \ + --build-arg BUILD_PACKAGE=core/cmd/controller/main.go \ + -t $(CONTROLLER_IMG) -f go/Dockerfile ./go + $(DOCKER_PUSH) $(CONTROLLER_IMG) + +.PHONY: build-controller-e2e +build-controller-e2e: ## Build the E2E controller with placeholder digests for unused sandbox workloads +build-controller-e2e: buildx-create + @set -e; \ + DIGEST_LDFLAGS=$$(CONTAINER_RUNTIME=$(CONTAINER_RUNTIME) \ + APP_IMG=$(APP_IMG)@$(E2E_PLACEHOLDER_DIGEST) \ + APP_FULL_IMG=$(APP_FULL_IMG)@$(E2E_PLACEHOLDER_DIGEST) \ + GOLANG_ADK_IMG=$(GOLANG_ADK_IMG)@$(E2E_PLACEHOLDER_DIGEST) \ + GOLANG_ADK_FULL_IMG=$(GOLANG_ADK_FULL_IMG)@$(E2E_PLACEHOLDER_DIGEST) \ + ACP_SANDBOX_OPENCLAW_IMG=$(ACP_SANDBOX_OPENCLAW_IMG)@$(E2E_PLACEHOLDER_DIGEST) \ + ACP_SANDBOX_HERMES_IMG=$(ACP_SANDBOX_HERMES_IMG)@$(E2E_PLACEHOLDER_DIGEST) \ + ./scripts/controller-digest-ldflags.sh); \ + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) \ + $(call docker-cache-args,controller) \ --build-arg LDFLAGS="$(LDFLAGS)$$DIGEST_LDFLAGS" \ --build-arg BUILD_PACKAGE=core/cmd/controller/main.go \ -t $(CONTROLLER_IMG) -f go/Dockerfile ./go $(DOCKER_PUSH) $(CONTROLLER_IMG) +.PHONY: build-e2e +build-e2e: ## Build and push only the component images exercised by E2E tests +build-e2e: buildx-create build-skills-init build-app build-app-full build-golang-adk build-golang-adk-full build-controller-e2e + .PHONY: build-ui build-ui: ## Build and push the UI image build-ui: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(UI_IMG) -f ui/Dockerfile ./ui + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,ui) $(TOOLS_IMAGE_BUILD_ARGS) -t $(UI_IMG) -f ui/Dockerfile ./ui $(DOCKER_PUSH) $(UI_IMG) .PHONY: build-kagent-adk build-kagent-adk: ## Build and push the Python kagent ADK image build-kagent-adk: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(KAGENT_ADK_IMG) -f python/Dockerfile ./python + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,kagent-adk) $(TOOLS_IMAGE_BUILD_ARGS) -t $(KAGENT_ADK_IMG) -f python/Dockerfile ./python $(DOCKER_PUSH) $(KAGENT_ADK_IMG) .PHONY: build-app build-app: ## Build and push the app image (distroless slim; depends on kagent-adk) build-app: buildx-create build-kagent-adk - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg KAGENT_ADK_VERSION=$(KAGENT_ADK_IMAGE_TAG) --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) -t $(APP_IMG) -f python/Dockerfile.app ./python + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,app) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg KAGENT_ADK_VERSION=$(KAGENT_ADK_IMAGE_TAG) --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) -t $(APP_IMG) -f python/Dockerfile.app ./python $(DOCKER_PUSH) $(APP_IMG) .PHONY: build-kagent-adk-full build-kagent-adk-full: ## Build and push the full Python kagent ADK image (includes sandbox runtime) build-kagent-adk-full: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(KAGENT_ADK_FULL_IMG) -f python/Dockerfile.full ./python + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,kagent-adk-full) $(TOOLS_IMAGE_BUILD_ARGS) -t $(KAGENT_ADK_FULL_IMG) -f python/Dockerfile.full ./python $(DOCKER_PUSH) $(KAGENT_ADK_FULL_IMG) .PHONY: build-app-full build-app-full: ## Build and push the full app image (sandbox runtime; depends on kagent-adk-full) build-app-full: buildx-create build-kagent-adk-full - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg KAGENT_ADK_VERSION=$(KAGENT_ADK_FULL_IMAGE_TAG) --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) -t $(APP_FULL_IMG) -f python/Dockerfile.app ./python + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,app-full) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg KAGENT_ADK_VERSION=$(KAGENT_ADK_FULL_IMAGE_TAG) --build-arg DOCKER_REGISTRY=$(DOCKER_REGISTRY) -t $(APP_FULL_IMG) -f python/Dockerfile.app ./python $(DOCKER_PUSH) $(APP_FULL_IMG) .PHONY: build-golang-adk build-golang-adk: ## Build and push the Go ADK image build-golang-adk: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg BUILD_PACKAGE=adk/cmd/main.go -t $(GOLANG_ADK_IMG) -f go/Dockerfile ./go + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,golang-adk) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg BUILD_PACKAGE=adk/cmd/main.go -t $(GOLANG_ADK_IMG) -f go/Dockerfile ./go $(DOCKER_PUSH) $(GOLANG_ADK_IMG) .PHONY: build-golang-adk-full build-golang-adk-full: ## Build and push the Go ADK full image (with extra tooling) build-golang-adk-full: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg BUILD_PACKAGE=adk/cmd/main.go -t $(GOLANG_ADK_FULL_IMG) -f go/Dockerfile.full ./go + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,golang-adk-full) $(TOOLS_IMAGE_BUILD_ARGS) --build-arg BUILD_PACKAGE=adk/cmd/main.go -t $(GOLANG_ADK_FULL_IMG) -f go/Dockerfile.full ./go $(DOCKER_PUSH) $(GOLANG_ADK_FULL_IMG) .PHONY: build-skills-init build-skills-init: ## Build and push the skills-init image build-skills-init: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) -t $(SKILLS_INIT_IMG) -f docker/skills-init/Dockerfile ./go + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,skills-init) -t $(SKILLS_INIT_IMG) -f docker/skills-init/Dockerfile ./go $(DOCKER_PUSH) $(SKILLS_INIT_IMG) .PHONY: build-acp-sandbox @@ -339,25 +373,25 @@ build-acp-sandbox: build-acp-sandbox-hermes build-acp-sandbox-openclaw build-acp .PHONY: build-acp-sandbox-base build-acp-sandbox-base: ## Build and push the ACP sandbox base image (acp-shim only, no agent) build-acp-sandbox-base: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --target base -t $(ACP_SANDBOX_BASE_IMG) -f docker/acp-sandbox/Dockerfile ./go + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,acp-sandbox-base) $(TOOLS_IMAGE_BUILD_ARGS) --target base -t $(ACP_SANDBOX_BASE_IMG) -f docker/acp-sandbox/Dockerfile ./go $(DOCKER_PUSH) $(ACP_SANDBOX_BASE_IMG) .PHONY: build-acp-sandbox-hermes build-acp-sandbox-hermes: ## Build and push the ACP sandbox Hermes image build-acp-sandbox-hermes: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --target hermes -t $(ACP_SANDBOX_HERMES_IMG) -f docker/acp-sandbox/Dockerfile ./go + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,acp-sandbox-hermes) $(TOOLS_IMAGE_BUILD_ARGS) --target hermes -t $(ACP_SANDBOX_HERMES_IMG) -f docker/acp-sandbox/Dockerfile ./go $(DOCKER_PUSH) $(ACP_SANDBOX_HERMES_IMG) .PHONY: build-acp-sandbox-openclaw build-acp-sandbox-openclaw: ## Build and push the ACP sandbox OpenClaw image build-acp-sandbox-openclaw: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --target openclaw -t $(ACP_SANDBOX_OPENCLAW_IMG) -f docker/acp-sandbox/Dockerfile ./go + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,acp-sandbox-openclaw) $(TOOLS_IMAGE_BUILD_ARGS) --target openclaw -t $(ACP_SANDBOX_OPENCLAW_IMG) -f docker/acp-sandbox/Dockerfile ./go $(DOCKER_PUSH) $(ACP_SANDBOX_OPENCLAW_IMG) .PHONY: build-acp-sandbox-claude build-acp-sandbox-claude: ## Build and push the ACP sandbox Claude image build-acp-sandbox-claude: buildx-create - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) --target claude -t $(ACP_SANDBOX_CLAUDE_IMG) -f docker/acp-sandbox/Dockerfile ./go + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,acp-sandbox-claude) $(TOOLS_IMAGE_BUILD_ARGS) --target claude -t $(ACP_SANDBOX_CLAUDE_IMG) -f docker/acp-sandbox/Dockerfile ./go $(DOCKER_PUSH) $(ACP_SANDBOX_CLAUDE_IMG) .PHONY: push @@ -373,23 +407,44 @@ lint: ## Run linters for Go and Python make -C python lint .PHONY: push-test-agent -push-test-agent: buildx-create build-kagent-adk build-kagent-adk-full ## Build and push E2E test agent images to the local registry - echo "Building FROM DOCKER_REGISTRY=$(DOCKER_REGISTRY)/$(DOCKER_REPO)/kagent-adk:$(VERSION)-full" - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/kebab:latest -f go/core/test/e2e/agents/kebab/Dockerfile ./go/core/test/e2e/agents/kebab +push-test-agent: build-kagent-adk push-test-agent-images ## Build and push E2E test agent images to the local registry + +.PHONY: build-test-kebab +build-test-kebab: buildx-create build-kagent-adk-full + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,test-kebab) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/kebab:latest -f go/core/test/e2e/agents/kebab/Dockerfile ./go/core/test/e2e/agents/kebab $(DOCKER_PUSH) $(DOCKER_REGISTRY)/kebab:latest - kubectl apply --namespace kagent --context kind-$(KIND_CLUSTER_NAME) -f go/core/test/e2e/agents/kebab/agent.yaml - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/poem-flow:latest -f python/samples/crewai/poem_flow/Dockerfile ./python + +.PHONY: build-test-poem-flow +build-test-poem-flow: buildx-create + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,test-poem-flow) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/poem-flow:latest -f python/samples/crewai/poem_flow/Dockerfile ./python $(DOCKER_PUSH) $(DOCKER_REGISTRY)/poem-flow:latest - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/basic-openai:latest -f python/samples/openai/basic_agent/Dockerfile ./python + +.PHONY: build-test-basic-openai +build-test-basic-openai: buildx-create + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,test-basic-openai) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/basic-openai:latest -f python/samples/openai/basic_agent/Dockerfile ./python $(DOCKER_PUSH) $(DOCKER_REGISTRY)/basic-openai:latest - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/langgraph-kebab:latest -f python/samples/langgraph/kebab/Dockerfile ./python + +.PHONY: build-test-langgraph-kebab +build-test-langgraph-kebab: buildx-create + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,test-langgraph-kebab) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/langgraph-kebab:latest -f python/samples/langgraph/kebab/Dockerfile ./python $(DOCKER_PUSH) $(DOCKER_REGISTRY)/langgraph-kebab:latest +.PHONY: build-test-agent-images +build-test-agent-images: build-test-kebab build-test-poem-flow build-test-basic-openai build-test-langgraph-kebab + +.PHONY: push-test-agent-images +push-test-agent-images: build-test-agent-images ## Build, push, and deploy E2E test agents + echo "Building FROM DOCKER_REGISTRY=$(DOCKER_REGISTRY)/$(DOCKER_REPO)/kagent-adk:$(VERSION)-full" + kubectl apply --namespace kagent --context kind-$(KIND_CLUSTER_NAME) -f go/core/test/e2e/agents/kebab/agent.yaml + +.PHONY: build-test-kebab-maker +build-test-kebab-maker: buildx-create + $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(call docker-cache-args,test-kebab-maker) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/kebab-maker:latest -f go/core/test/e2e/testdata/skills/kebab-maker/Dockerfile ./go/core/test/e2e/testdata/skills/kebab-maker + $(DOCKER_PUSH) $(DOCKER_REGISTRY)/kebab-maker:latest + .PHONY: push-test-skill -push-test-skill: buildx-create ## Build and push E2E test skill images to the local registry +push-test-skill: build-test-kebab-maker ## Build and push E2E test skill images to the local registry echo "Building FROM DOCKER_REGISTRY=$(DOCKER_REGISTRY)/$(DOCKER_REPO)/kebab-maker:$(VERSION)" - $(DOCKER_BUILDER) $(DOCKER_BUILD_ARGS) $(TOOLS_IMAGE_BUILD_ARGS) -t $(DOCKER_REGISTRY)/kebab-maker:latest -f go/core/test/e2e/testdata/skills/kebab-maker/Dockerfile ./go/core/test/e2e/testdata/skills/kebab-maker - $(DOCKER_PUSH) $(DOCKER_REGISTRY)/kebab-maker:latest ##@ Cluster @@ -515,6 +570,16 @@ helm-install: ## Build all images then install kagent onto the kind cluster helm-install: build helm-install: helm-install-provider +.PHONY: helm-install-e2e +helm-install-e2e: ## Build the E2E image set and install kagent without the unused UI workload +helm-install-e2e: build-e2e + $(MAKE) helm-install-provider KAGENT_HELM_EXTRA_ARGS="$(KAGENT_HELM_EXTRA_ARGS) --set ui.replicas=0" + +.PHONY: ci-e2e-install +ci-e2e-install: ## Build all E2E images in parallel, install kagent, and deploy the test agent +ci-e2e-install: helm-install-e2e build-test-agent-images build-test-kebab-maker + kubectl apply --namespace kagent --context kind-$(KIND_CLUSTER_NAME) -f go/core/test/e2e/agents/kebab/agent.yaml + .PHONY: helm-test-install helm-test-install: ## Dry-run helm install to validate chart rendering (pipe to tee for inspection) helm-test-install: HELM_ACTION+="--dry-run"