# TODO: Makefile is deprecated, add new targets as mise tasks in mise.toml instead. CORROSION_VERSION ?= 2026.6.15 CORROSION_IMAGE = ghcr.io/unlabs-dev/corrosion:$(CORROSION_VERSION) UCIND_IMAGE ?= ghcr.io/psviderski/ucind:latest .PHONY: ucind-cluster ucind-cluster: go run ./cmd/ucind cluster rm && go run ./cmd/ucind cluster create -m $(if $(MACHINES_COUNT),$(MACHINES_COUNT),3) .PHONY: corrosion-image corrosion-image: docker build --build-arg CORROSION_VERSION=$(CORROSION_VERSION) -t "$(CORROSION_IMAGE)" --target corrosion . .PHONY: corrosion-multiarch-image-push corrosion-multiarch-image-push: docker buildx build --build-arg CORROSION_VERSION=$(CORROSION_VERSION) --push --platform linux/amd64,linux/arm64 \ -t "$(CORROSION_IMAGE)" --target corrosion . .PHONY: ucind-multiarch-image-push ucind-multiarch-image-push: docker buildx build --push --platform linux/amd64,linux/arm64 -t "$(UCIND_IMAGE)" --target ucind . .PHONY: test test: ifeq ($(TEST_NAME),) go test -shuffle=on -count=1 -v ./... else go test -shuffle=on -race -count=1 -v -run ^$(TEST_NAME)$$ ./... endif .PHONY: test-e2e test-e2e: go test -shuffle=on -race -count=1 -v ./test/e2e .PHONY: test-clean test-clean: @CONTAINERS=$$(docker ps --filter "label=ucind.managed" -q); \ if [ -n "$$CONTAINERS" ]; then \ echo "Killing containers..."; \ docker kill $$CONTAINERS; \ fi; \ CONTAINERS_STOPPED=$$(docker ps -a --filter "label=ucind.managed" -q); \ if [ -n "$$CONTAINERS_STOPPED" ]; then \ echo "Removing stopped containers..."; \ docker rm $$CONTAINERS_STOPPED; \ else \ echo "Nothing to clean."; \ fi