helmfile/pkg
yxxhero ee65b88edf feat: support .Environment.* in --output-dir-template
This commit adds support for accessing environment values in the --output-dir-template flag.

Previously, users could only access .OutputDir, .State.*, and .Release.* in the template.
Now .Environment.* is also available, allowing users to use environment values in the
output directory path.

Example usage:
  helmfile template -e test-1 --output-dir-template='{{ .OutputDir }}/{{ .Environment.cluster.name }}/{{ .Environment.Name }}/{{ .Release.Name }}'

This produces output like: ./gitops/my-test-cluster/test-1/release-name/

Changes:
- Add Environment field to GenerateOutputDir template data
- Add Environment field to generateChartPath template data (now a method on HelmState)
- Update help text for --output-dir-template flag in template and fetch commands
- Add test cases for Environment in template

Signed-off-by: yxxhero <aiopsclub@163.com>
2026-01-23 08:51:32 +08:00
..
app fix: update Helm version to v4.0.5 across workflows and configurations (#2368) 2026-01-18 15:25:09 +08:00
argparser fix #1095 (#1100) 2023-11-01 11:55:55 +08:00
cluster 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
config Add --sequential-helmfiles flag for optional sequential processing (#2350) 2026-01-08 14:28:25 -05:00
environment fix: array merge regression - layer arrays now replace defaults (#2367) 2026-01-18 14:04:54 +08:00
envvar Add parameter to render helmfile as go template without .gotmpl extension (#2312) 2025-12-09 14:41:47 +09:00
errors build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
event feat: include func support (#1187) 2023-12-04 21:51:01 +08:00
exectest fix: resolve issues #2295, #2296, and #2297 (#2298) 2025-11-27 22:13:03 +08:00
filesystem refactor(filesystem): add CopyDir method and optimize Fetch function (#2111) 2025-07-28 16:10:25 -04:00
hcllang feat: update go version and adjust dependencies in Dockerfile and go.mod (#1722) 2024-09-30 09:21:44 -04:00
helmexec Fix 2337 helm4 stale repo indexes (#2369) 2026-01-21 19:55:56 -05:00
maputil fix: array merge regression - layer arrays now replace defaults (#2367) 2026-01-18 14:04:54 +08:00
plugins Fix AWS SDK debug logging by making it configurable (issue #2270) (#2290) 2025-11-24 18:27:04 +08:00
policy build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
remote Upgrades go-getter to v2 (#2341) 2025-12-26 21:06:34 +08:00
runtime refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00
state feat: support .Environment.* in --output-dir-template 2026-01-23 08:51:32 +08:00
testhelper perf(app): Parallelize helmfile.d rendering and eliminate chdir race conditions (#2261) 2025-11-15 16:19:41 +08:00
testutil feat: add Helm 4 support while maintaining Helm 3 compatibility (#2262) 2025-11-19 07:49:30 +08:00
tmpl refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00
yaml refactor(yaml): switch yaml library import paths from gopkg.in to go.yaml.in (#2114) 2025-08-01 11:28:39 +08:00