diff --git a/Makefile b/Makefile index 7b527151..f64783ed 100644 --- a/Makefile +++ b/Makefile @@ -34,26 +34,24 @@ tools: mise .git/hooks/pre-commit tools-list: @mise list --current -.PHONY: helmbuildworker -helmbuildworker: ## Build Worker Helm dependencies +.PHONY: buildprom +buildprom: ## Build Prometheus Prefect Exporter Helm dependencies helm repo add bitnami https://charts.bitnami.com/bitnami - helm dependency build $(WORKER_CHART_PATH) + helm dependency build $(PROMETHEUS_PREFECT_EXPORTER_CHART_PATH) -.PHONY: helmbuildserver -helmbuildserver: ## Build Server Helm dependencies +.PHONY: buildserver +buildserver: ## Build Server Helm dependencies helm repo add bitnami https://charts.bitnami.com/bitnami helm dependency build $(SERVER_CHART_PATH) -.PHONY: helmbuildprom -helmbuildprom: ## Build Prometheus Prefect Exporter Helm dependencies +.PHONY: buildworker +buildworker: ## Build Worker Helm dependencies helm repo add bitnami https://charts.bitnami.com/bitnami - helm dependency build $(PROMETHEUS_PREFECT_EXPORTER_CHART_PATH) + helm dependency build $(WORKER_CHART_PATH) -.PHONY: helmbuild -helmbuild: helmbuildworker helmbuildserver helmbuildprom +.PHONY: buildall +buildall: buildworker buildserver buildprom -.PHONY: helmunittest -helmunittest: ## Run Helm unittest - helm unittest $(WORKER_CHART_PATH) - helm unittest $(SERVER_CHART_PATH) - helm unittest $(PROMETHEUS_PREFECT_EXPORTER_CHART_PATH) +.PHONY: helmtest +helmtest: ## Run Helm unittest + ./scripts/helm_unittest.sh diff --git a/README.md b/README.md index 5e439053..6d199c0f 100644 --- a/README.md +++ b/README.md @@ -166,18 +166,26 @@ If you are using the subchart deployed database with persistence enabled, it is Contributions to the Prefect Helm Charts are always welcome! We welcome your help - whether it's adding new functionality, echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrctweaking documentation, or anything in between. In order to successfully contribute, you'll need to fork this repository and commit changes to your local prefect-helm repo. You can then open a PR against this upstream repo that the team will review! -To get started, ensure you have the required dependencies installed: +To get started, install the required dependencies by running: ```shell -mise install +make all ``` -Be sure to run `pre-commit install` before starting any development. [`pre-commit`](https://pre-commit.com/) -will help catch simple issues before committing. +This will install tools like `helm`, `pre-commit`, and `mise`. -### Documentation +You'll also need to install dependencies for the charts you're working on. You can use the following commands to install dependencies for each chart: -Please make sure that your changes have been linted & the chart documentation has been updated. The easiest way to accomplish this is by installing [`pre-commit`](https://pre-commit.com/). +```shell +# Server Chart +make buildserver +# Worker Chart +make buildworker +# Prometheus Prefect Exporter Chart +make buildprom +# All Charts +make buildall +``` ### Testing & validation @@ -190,7 +198,7 @@ Refer to the `helm-unittest` repository for more information. The following helper script will run the tests via the `helm-unittest` Docker image in case you don't have the binary installed locally: ```shell -./scripts/helm_unittest.sh +make helmtest ``` When `helm-unittest` is available via the [`mise` registry](https://mise.jdx.dev/registry.html), we'll add it to `.mise.toml`