feat: add helm-unittest integration

This commit adds support for running helm-unittest on releases defined in helmfile.

Features:
- Add unittest command to run helm-unittest on releases
- Add unitTests field to release spec for specifying test directories
- Add helm-unittest plugin to init command
- Support for --values, --fail-fast, --color, --debug-plugin, --unittest-args flags
- Concurrent execution support
- Integration with needs/selectors like other commands

Example usage:
  helmfile unittest -e test
  helmfile unittest --fail-fast --color
  helmfile unittest --values values.yaml

Example helmfile.yaml:
  releases:
  - name: myapp
    chart: ./charts/myapp
    unitTests:
      - tests/

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2026-01-23 09:08:05 +08:00
parent 7500eef7c6
commit e9069679f6
12 changed files with 352 additions and 0 deletions
+3
View File
@@ -224,6 +224,9 @@ func (helm *Helm) TemplateRelease(name, chart string, flags ...string) error {
helm.Templated = append(helm.Templated, Release{Name: name, Flags: flags})
return nil
}
func (helm *Helm) UnittestRelease(context helmexec.HelmContext, name, chart string, flags ...string) error {
return nil
}
func (helm *Helm) ChartPull(chart string, path string, flags ...string) error {
return nil
}