From 08c88f06c9daf51941bae278d3c9e377302c03d3 Mon Sep 17 00:00:00 2001 From: Zadkiel Date: Sat, 13 Sep 2025 21:51:02 +0200 Subject: [PATCH 1/2] feat: setup mise-en-place --- mise.toml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 mise.toml diff --git a/mise.toml b/mise.toml new file mode 100644 index 00000000..40257f93 --- /dev/null +++ b/mise.toml @@ -0,0 +1,32 @@ +[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.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 +# """ From b8a2003470128b6ed23c196f7f7738c2dee9ae31 Mon Sep 17 00:00:00 2001 From: Zadkiel Date: Sat, 13 Sep 2025 21:59:02 +0200 Subject: [PATCH 2/2] wip --- .github/workflows/pull_request.yaml | 2 +- Makefile | 14 -------------- mise.toml | 10 ++++++++++ renovate.json | 5 ++++- 4 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 Makefile 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 index 40257f93..de200989 100644 --- a/mise.toml +++ b/mise.toml @@ -16,6 +16,16 @@ sed -i 's/^version: [0-9]\\{1,\\}\\.[0-9]\\{1,\\}\\.[0-9]\\{1,\\}/version: {{arg 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" 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 } }