diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 73d265be..64cc9709 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -72,4 +72,4 @@ jobs: sort-values-order: file - name: Check diff run: | - git diff --exit-code README.md || { echo; echo "error: README.md is out of date. Please run `make build-docs` and commit the resulting file."; exit 1; } + git diff --exit-code README.md || { echo; echo "error: README.md is out of date. Please run `mise run build-docs` and commit the resulting file."; exit 1; } diff --git a/Makefile b/Makefile deleted file mode 100644 index 1922a157..00000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -SHELL := /bin/bash - -install-hooks: - command -v pre-commit 2>&1 >/dev/null || pip install pre-commit - pre-commit install - -bump-chart: - @test -n "$(VERSION)" || (echo "VERSION environment variable is not set"; exit 1) - sed -i 's/^version: [0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/version: $(VERSION)/' application/Chart.yaml - -build-docs: install-hooks - # Running helm-docs-built twice to ensure that the generated docs are up-to-date - pre-commit run helm-docs-built --all-files || true - pre-commit run helm-docs-built --all-files diff --git a/mise.toml b/mise.toml new file mode 100644 index 00000000..de200989 --- /dev/null +++ b/mise.toml @@ -0,0 +1,42 @@ +[tools] +prek = "0.1.6" +helm = "3.19.0" +helm-docs = "1.14.2" +"ubi:helm-unittest/helm-unittest" = { version = "1.0.1", exe = "untt", rename_exe = "helm-unittest" } +yamlfmt = "0.17.2" + +[tasks.set-version] +description = "Bump the version of the Helm chart" +usage = "mise run set-version " +run = """ +sed -i 's/^version: [0-9]\\{1,\\}\\.[0-9]\\{1,\\}\\.[0-9]\\{1,\\}/version: {{arg(name="version")}}/' application/Chart.yaml +""" + +[tasks.install-hooks] +description = "Install Git pre-commit hooks" +run = "prek install --install-hooks" + +[tasks.build-docs] +description = "Build the documentation" +run = """ +# Keep args in sync with /.github/workflows/pull_request.yaml +helm-docs \\ + --output-file=./../README.md \\ + --template-files=./README.md.gotmpl \\ + --sort-values-order=file +""" + +[tasks.helm-lint] +description = "Lint the Helm chart" +run = "helm lint application" + +# [tasks.yaml-fmt] +# description = "Format YAML files" +# run = """ +# yamlfmt -formatter eof_newline=true,retain_line_breaks_single=true,pad_line_comments=2 \\ +# pre-commit-config.yaml \\ +# application/values.yaml \\ +# application/values-test.yaml \\ +# application/Chart.yaml \\ +# application/tests/*.yaml +# """ diff --git a/renovate.json b/renovate.json index dfe6ee4c..6b369a60 100644 --- a/renovate.json +++ b/renovate.json @@ -1,9 +1,12 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:recommended" + "config:best-practices" ], "pre-commit": { "enabled": true + }, + "mise": { + "enabled": true } }