Files
MKM/Makefile
Jp 618f826e1e ci: improve deployment script verbosity and error handling
- Remove stderr suppression from podman kube down to show potential errors
- Remove @ prefix from kubectl command to show execution in output
- Add comment clarifying the purpose of removing stderr redirection
2026-02-26 11:06:21 +08:00

22 lines
736 B
Makefile

IMG := mkm-admin
build:
podman build -t $(IMG) .
deploy: build
@if [ ! -f .env ]; then cp .env.example .env; fi
@echo "Cleaning up existing deployment if any..."
-podman kube down k8s/deployment.yaml
@echo "Generating merged deployment with ConfigMap..."
kubectl create configmap mkm-admin-config --from-env-file=.env --dry-run=client -o yaml > k8s/merged_deployment.yaml
@echo "---" >> k8s/merged_deployment.yaml
@cat k8s/deployment.yaml >> k8s/merged_deployment.yaml
@echo "Deploying via podman kube play..."
podman kube play k8s/merged_deployment.yaml # Remove the pipe to stderr to see full output
@rm k8s/merged_deployment.yaml
stop:
-podman kube down k8s/deployment.yaml >/dev/null 2>&1
.PHONY: build deploy stop