Skip to content

Commit b90f557

Browse files
authored
feat: add checks for 'nix' and Kubernetes cluster to 'run-dev' recipe in Makefile (#355)
* feat: add checks for 'nix' and Kubernetes cluster to 'run-dev' recipe in Makefile * add check to stop-dev as well
1 parent 76bc24f commit b90f557

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

template/Makefile.j2

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,15 @@ build: regenerate-charts regenerate-nix helm-package docker-build
150150

151151
publish: docker-publish helm-publish
152152

153-
run-dev:
153+
check-nix:
154+
@which nix || (echo "Error: 'nix' is not installed. Please install it to proceed."; exit 1)
155+
156+
check-kubernetes:
157+
@kubectl cluster-info > /dev/null 2>&1 || (echo "Error: Kubernetes is not running or kubectl is not properly configured."; exit 1)
158+
159+
run-dev: check-nix check-kubernetes
154160
kubectl apply -f deploy/stackable-operators-ns.yaml
155161
nix run -f. tilt -- up --port {[5430 + operator_index}] --namespace stackable-operators
156162

157-
stop-dev:
163+
stop-dev: check-nix check-kubernetes
158164
nix run -f. tilt -- down

0 commit comments

Comments
 (0)