ci: render, lint and kubeconform every chart on pull requests #125

Merged
morten-olsen merged 2 commits from mc/afcef583-9ca0-48d5-9540-9ca3f1eeac74 into main 2026-10-07 18:57:19 +02:00
Owner

Summary

Pull requests to homelab/apps had no build, so chart defects only showed up live. This adds .woodpecker/charts.yaml (event: pull_request, manual), which runs scripts/ci/validate-charts.sh over every chart under apps/charts (including *.disabled):

  1. helm lint with the ApplicationSet's globals (taken from apps/root/values.yaml)
  2. helm template piped through kubeconform -strict -ignore-missing-schemas (CRDs skipped)
  3. the chart's own tests/render.sh, where one exists

Tools are pinned in mise.toml (helm 3.19.0, kubeconform 0.7.0, yq 4.47.1, jq 1.8.1). The step image is ci/mise:74db91eb pinned by digest. The same script runs locally with mise install && scripts/ci/validate-charts.sh [chart-dir...].

The base PR only moves the repos/apps pointer.

Evidence

  • Local run over all 73 charts: all passed, including mission-control.disabled/tests/render.sh.
  • Negative test: a copy of ntfy with an invalid Deployment now fails helm lint and kubeconform, and an invalid chart version fails helm dependency build.
  • woodpecker-cli lint --strict .woodpecker/charts.yaml: valid.
  • The repository is already active in Woodpecker (woodpecker-cli repo ls), so nothing for Morten to enable.
  • Not yet seen: the pipeline running on Woodpecker. This PR is the first run.

Merge danger

The workflow only triggers on pull_request and manual, so it does not touch ArgoCD or the cluster. Merging changes no workloads. A chart that fails the check will block its own PR once the check is made required, which has not been done.

Rollback

Revert the commit; no live state depends on it.

Verification after merge

Open a PR against homelab/apps and confirm the charts pipeline runs and goes green.

The repos/apps submodule's part of a change to https://code.olsen.cloud/homelab/base. Merge it first.

## Summary Pull requests to `homelab/apps` had no build, so chart defects only showed up live. This adds `.woodpecker/charts.yaml` (event: pull_request, manual), which runs `scripts/ci/validate-charts.sh` over every chart under `apps/charts` (including `*.disabled`): 1. `helm lint` with the ApplicationSet's globals (taken from `apps/root/values.yaml`) 2. `helm template` piped through `kubeconform -strict -ignore-missing-schemas` (CRDs skipped) 3. the chart's own `tests/render.sh`, where one exists Tools are pinned in `mise.toml` (helm 3.19.0, kubeconform 0.7.0, yq 4.47.1, jq 1.8.1). The step image is `ci/mise:74db91eb` pinned by digest. The same script runs locally with `mise install && scripts/ci/validate-charts.sh [chart-dir...]`. The base PR only moves the `repos/apps` pointer. ## Evidence - Local run over all 73 charts: all passed, including `mission-control.disabled/tests/render.sh`. - Negative test: a copy of `ntfy` with an invalid Deployment now fails `helm lint` and kubeconform, and an invalid chart version fails `helm dependency build`. - `woodpecker-cli lint --strict .woodpecker/charts.yaml`: valid. - The repository is already active in Woodpecker (`woodpecker-cli repo ls`), so nothing for Morten to enable. - Not yet seen: the pipeline running on Woodpecker. This PR is the first run. ## Merge danger The workflow only triggers on `pull_request` and `manual`, so it does not touch ArgoCD or the cluster. Merging changes no workloads. A chart that fails the check will block its own PR once the check is made required, which has not been done. ## Rollback Revert the commit; no live state depends on it. ## Verification after merge Open a PR against `homelab/apps` and confirm the `charts` pipeline runs and goes green. The repos/apps submodule's part of a change to https://code.olsen.cloud/homelab/base. Merge it first.
ci: render, lint and kubeconform every chart on pull requests
All checks were successful
ci/woodpecker/pr/charts Pipeline was successful
66211b13df
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ci: pin kubeconform to the cluster's Kubernetes version
All checks were successful
ci/woodpecker/pr/charts Pipeline was successful
a58dd9fccd
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
morten-olsen deleted branch mc/afcef583-9ca0-48d5-9540-9ca3f1eeac74 2026-10-07 18:57:19 +02:00
Sign in to join this conversation.
No description provided.