Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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