Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/dispatch-helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ on:
type: boolean
default: true
values_key_mappings:
description: 'JSON mapping of component names to values.yaml keys. If not mapped, uses component name as fallback.'
description: 'JSON mapping of component names to values.yaml keys. If not mapped, uses component name as fallback. Map a component to null to leave it out of the chart update.'
type: string
default: ''
legacy_patch_detection:
Expand Down Expand Up @@ -350,6 +350,16 @@ jobs:
# Process each component
for row in $(echo "$COMPONENTS_JSON" | jq -c '.[]'); do
COMP_NAME=$(echo "$row" | jq -r '.name')

# A component mapped to null in values_key_mappings has no place in
# the chart (a test mock image, a sidecar the chart does not deploy):
# leave it out of the payload. Unmapped components still fall back to
# their own name as the values key, which is a root-level key.
if [ -n "$VALUES_KEY_MAPPINGS" ] && \
echo "$VALUES_KEY_MAPPINGS" | jq -e --arg name "$COMP_NAME" 'type == "object" and has($name) and .[$name] == null' >/dev/null 2>&1; then
echo "Skipping ${COMP_NAME}: mapped to null in values_key_mappings"
continue
fi
COMP_PATH=$(echo "$row" | jq -r '.path // empty')
COMP_VERSION=$(echo "$row" | jq -r '.version // empty')

Expand Down
2 changes: 1 addition & 1 deletion docs/dispatch-helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ It also classifies the release: when the tag being dispatched was cut from a mai
| `components_base_path` | Base path for components in the source repository | no | `components` |
| `env_file` | Env example file relative to the component path | no | `.env.example` |
| `detect_env_changes` | Detect environment variables added since the previous release | no | `true` |
| `values_key_mappings` | JSON mapping of component names to `values.yaml` keys | no | `''` |
| `values_key_mappings` | JSON mapping of component names to `values.yaml` keys. A key may be nested (`app.migrations` writes `app.migrations.image.tag`). Map a component to `null` to leave it out of the chart update (e.g. a test mock image the chart does not deploy); an unmapped component falls back to its own name as a root-level key | no | `''` |
| `legacy_patch_detection` | Flag releases cut from maintenance branches as legacy patches | no | `true` |
| `legacy_branch_patterns` | Glob patterns (newline or comma separated) of maintenance branches | no | `maintenance/*` |
| `runner_type` | GitHub runner type | no | `blacksmith-4vcpu-ubuntu-2404` |
Expand Down
2 changes: 1 addition & 1 deletion docs/go-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ A third layout needs `release_single_app: true`: **one semantic-release tag for
| `helm_chart` | Helm chart name to update (required when `enable_helm_dispatch`) | string | `''` |
| `helm_detect_env_changes` | Detect new environment variables for Helm during dispatch | boolean | `true` |
| `helm_env_file` | Example env file `helm_detect_env_changes` reads, relative to each component path. Set it when the repository keeps its example env elsewhere (e.g. `config/.env.example`) — otherwise detection finds nothing. Per-group override: `helm_env_file` | string | `.env.example` |
| `helm_values_key_mappings` | JSON mapping of component names to values.yaml keys | string | `''` |
| `helm_values_key_mappings` | JSON mapping of component names to values.yaml keys (nested keys allowed; `null` leaves a component out of the chart update) | string | `''` |
| `extra_builds` | JSON array of additional build groups, each forwarded to `build.yml` with its own config; all feed the single gitops-update (see [Multiple build groups](#multiple-build-groups)) | string | `''` |
| `dockerfile_name` | Dockerfile name for the primary build and every `extra_builds` group (per-group override via the group's own `dockerfile_name`); forwarded to `build.yml`, which resolves the path as `{working_dir}/{dockerfile_name}` | string | `'Dockerfile'` |
| `enable_goreleaser` | Publish binaries with GoReleaser from the repository `.goreleaser.yml`, instead of (or in addition to) container images (see [GoReleaser binary lane](#goreleaser-binary-lane)) | boolean | `false` |
Expand Down
Loading