Agent Skill · Apollo Config
apollo-helm-chart-release
Run Apollo Helm chart release workflow with local automation and publish confirmation gates. Use when apollo-helm-chart version/appVersion updates require packaging both charts, refreshing docs/index.yaml, validating whitelist changes, committing with Conventional Commit, and preparing a ready-for-review PR draft.
Skill body
Apollo Helm Chart Release
Run this skill when you need to publish a new Helm chart release for apolloconfig/apollo-helm-chart after chart version updates.
Workflow Contract
- Work only in the current directory.
- Require current directory to be
apollo-helm-chartrepository root. - Require at least one git remote URL normalized to
github.com/apolloconfig/apollo-helm-chart. - Require no existing
*.tgzfiles in repository root before packaging. - Default to strict chart consistency:
apollo-portal/Chart.yamlandapollo-service/Chart.yamlmust share the sameversion.apollo-portal/Chart.yamlandapollo-service/Chart.yamlmust share the sameappVersion.
- Never push or create PR automatically; always stop with explicit gate commands.
Command Entry
Run from apollo-helm-chart repository root:
python3 scripts/release_flow.py run \
[--allow-version-mismatch] \
[--skip-lint] \
[--dry-run]
When executing manually outside the skill runner, use the absolute script path under this skill directory.
Options
--allow-version-mismatch- Continue when portal/service
versionorappVersionare different. - Default behavior without this flag is fail-fast.
- Continue when portal/service
--skip-lint- Skip
helm lint apollo-portalandhelm lint apollo-service. - Default behavior runs lint for both charts.
- Skip
--dry-run- Do not mutate repository files.
- Print checks, branch/commit/PR draft, and planned release commands.
Step Mapping
- Preflight
- Verify repository layout:
apollo-portal/Chart.yamlapollo-service/Chart.yamldocs/index.yaml
- Verify required tools:
- required:
git,helm - warning-only for later gate:
gh
- required:
- Verify remote includes
apolloconfig/apollo-helm-chart. - Verify repository root has no stale
*.tgz.
- Verify repository layout:
- Trigger Detection
- Check
git diff HEAD -- apollo-portal/Chart.yaml apollo-service/Chart.yaml. - If diff contains
versionorappVersionchanges, continue. - If diff does not contain those fields:
- compare current chart
versionto latest version indocs/index.yaml. - if docs is behind on any chart, continue with warning.
- otherwise stop with “no version change and docs not behind”.
- compare current chart
- Check
- Consistency Check
- Enforce portal/service
versionandappVersionequality. - Allow explicit override only via
--allow-version-mismatch.
- Enforce portal/service
- Validation
- Run:
helm lint apollo-portalhelm lint apollo-service
- Stop on any failure.
- Run:
- Package + Index (raw command style)
- Run in repo root:
helm package apollo-portalhelm package apollo-servicemv *.tgz docs
- Run in
docs:helm repo index .
- Run in repo root:
- Whitelist Check
- Read
git status --porcelain. - Allow changed files only:
apollo-portal/Chart.yamlapollo-service/Chart.yamldocs/index.yamldocs/apollo-portal-*.tgzdocs/apollo-service-*.tgz
- Stop when any other file is changed.
- Read
- Branch + Commit
- Branch naming:
- same chart versions:
codex/helm-release-<version> - different chart versions:
codex/helm-release-<portal-version>-<service-version>
- same chart versions:
- Branch strategy:
- reuse when already on target branch
- otherwise checkout existing branch or create new branch
- Commit message format:
- title:
chore(charts): release helm charts (portal <pver>, service <sver>) - body:
- title:
portal appVersion: <papp>service appVersion: <sapp>
- Branch naming:
- Publish Gates (manual confirmation only)
- Output push gate command:
git push -u origin <branch>
- Output PR gate command:
gh pr create --title "<title>" --body-file "<temp-file>"
- Default PR state is ready-for-review (no
--draft). - PR body uses
references/pr-template.md.
- Output push gate command:
Scripts
scripts/release_flow.py- Main orchestrator.
- Handles preflight, trigger detection, lint, package/index, whitelist gate, branch/commit, and PR draft output.
scripts/test_release_flow_helpers.py- Unit tests for helper functions:
- chart yaml parsing
- git diff version field extraction
- docs/index latest version extraction
- branch naming
- whitelist matching
- Unit tests for helper functions:
References
references/pr-template.md- PR body template with fixed sections:
- What changed
- Version matrix
- Helm release artifacts
- Commands executed
- Checklist
- PR body template with fixed sections:
Operational Notes
- Keep release runs on a clean worktree except intentional release files.
- Use
--dry-runfirst when uncertain. - Default behavior does not auto-push or auto-create PR.
- Do not bypass whitelist failures; fix unexpected changes first.