Skip to content

Commit

Permalink
feat: add checks for 'nix' and Kubernetes cluster to 'run-dev' recipe…
Browse files Browse the repository at this point in the history
… in Makefile (#355)

* feat: add checks for 'nix' and Kubernetes cluster to 'run-dev' recipe in Makefile

* add check to stop-dev as well
  • Loading branch information
fhennig authored Apr 3, 2024
1 parent 76bc24f commit b90f557
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions template/Makefile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,15 @@ build: regenerate-charts regenerate-nix helm-package docker-build

publish: docker-publish helm-publish

run-dev:
check-nix:
@which nix || (echo "Error: 'nix' is not installed. Please install it to proceed."; exit 1)

check-kubernetes:
@kubectl cluster-info > /dev/null 2>&1 || (echo "Error: Kubernetes is not running or kubectl is not properly configured."; exit 1)

run-dev: check-nix check-kubernetes
kubectl apply -f deploy/stackable-operators-ns.yaml
nix run -f. tilt -- up --port {[5430 + operator_index}] --namespace stackable-operators

stop-dev:
stop-dev: check-nix check-kubernetes
nix run -f. tilt -- down

0 comments on commit b90f557

Please sign in to comment.