-
Notifications
You must be signed in to change notification settings - Fork 162
feat: Helm chart release synchronization #5187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Helm chart release synchronization #5187
Conversation
98dc50b
to
7527d5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let#s see how this works! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a unified release automation workflow that synchronizes Helm chart releases with application releases, replacing separate and potentially conflicting release processes with a single coordinated pipeline.
- Consolidates all release components (binaries, images, Helm charts, NPM packages) into one workflow
- Adds version synchronization validation to ensure consistency across all artifacts
- Removes legacy workflows that could cause release conflicts
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
release-please-config.json | Restructures configuration to use structured YAML updates and removes separate chart package configuration |
charts/gitops-server/Chart.yaml | Updates chart version to match application version pattern for synchronization |
.release-please-manifest.json | Simplifies to single version entry, removing separate chart versioning |
.github/workflows/release-please.yaml | Transforms into unified release workflow with validation, chart packaging, and signing |
.github/workflows/prepare-release.yaml | Updates to remove manual chart updates, now handled by automation |
.github/workflows/helm.yaml | Removes legacy Helm workflow to prevent conflicts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
- Fix release-please configuration contradictions - Remove charts from exclude-paths, add structured extra-files - Disable separate-pull-requests for unified releases - Create unified-release.yaml workflow with version validation - Disable legacy helm.yaml and release-please.yaml workflows - Update chart version to sync with app version (0.39.0-rc.2) - Remove manual chart updates from prepare-release.yaml - Add comprehensive documentation for new release system Resolves Helm chart release synchronization issues: - Eliminates version misalignment between app and chart - Supports prerelease versions (RC) automatically - Provides single source of truth for all releases - Includes validation and error handling - Keep messaging clear and consistent - Keep messaging clear and consistent
7527d5d
to
fb5623f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
helm push helm-release/weave-gitops-${{ needs.release-please.outputs['charts/gitops-server--version'] }}.tgz \ | ||
oci://ghcr.io/weaveworks/charts &> helm-release/push-metadata.txt | ||
CHART_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml) | ||
CHART_FILE="helm-release/weave-gitops-${CHART_VERSION}.tgz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The chart name 'weave-gitops' is hardcoded in multiple places. Consider extracting it to a variable or using the chart name from Chart.yaml to improve maintainability.
CHART_FILE="helm-release/weave-gitops-${CHART_VERSION}.tgz" | |
CHART_NAME=$(yq e '.name' charts/gitops-server/Chart.yaml) | |
CHART_FILE="helm-release/${CHART_NAME}-${CHART_VERSION}.tgz" |
Copilot uses AI. Check for mistakes.
echo "All components have been released with synchronized versions:" >> $GITHUB_STEP_SUMMARY | ||
echo "- Application: ${{ needs.release-please.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
echo "- Chart AppVersion: ${{ needs.release-please.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
echo "- Chart Version: $(echo '${{ needs.release-please.outputs.version }}' | sed 's/^v//')" >> $GITHUB_STEP_SUMMARY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The version transformation logic (removing 'v' prefix) is duplicated here and in the validation step. Consider extracting this to a reusable variable or function.
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
"include-component-in-tag": false, | ||
"prerelease": true, | ||
"prerelease-type": "rc", | ||
"release-as": "0.39.0-rc.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded version string should be removed or updated. This static version override will prevent proper version bumping in future releases.
"release-as": "0.39.0-rc.3", |
Copilot uses AI. Check for mistakes.
# Validate that chart version follows expected pattern (remove 'v' prefix from app version) | ||
EXPECTED_CHART_VERSION=$(echo "$APP_VERSION" | sed 's/^v//') | ||
if [[ "$CHART_VERSION" != "$EXPECTED_CHART_VERSION" ]]; then | ||
echo "Error: Chart version ($CHART_VERSION) does not match expected version ($EXPECTED_CHART_VERSION)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sed command will fail if APP_VERSION doesn't have a 'v' prefix. Consider using a more robust approach that handles both 'v0.39.0-rc.2' and '0.39.0-rc.2' formats.
# Validate that chart version follows expected pattern (remove 'v' prefix from app version) | |
EXPECTED_CHART_VERSION=$(echo "$APP_VERSION" | sed 's/^v//') | |
if [[ "$CHART_VERSION" != "$EXPECTED_CHART_VERSION" ]]; then | |
echo "Error: Chart version ($CHART_VERSION) does not match expected version ($EXPECTED_CHART_VERSION)" | |
# Validate that chart version follows expected pattern (remove 'v' prefix from both app version and chart version) | |
NORMALIZED_APP_VERSION=$(echo "$APP_VERSION" | sed 's/^v//') | |
NORMALIZED_CHART_VERSION=$(echo "$CHART_VERSION" | sed 's/^v//') | |
if [[ "$NORMALIZED_CHART_VERSION" != "$NORMALIZED_APP_VERSION" ]]; then | |
echo "Error: Chart version ($CHART_VERSION) does not match expected version ($APP_VERSION) (normalized: $NORMALIZED_CHART_VERSION vs $NORMALIZED_APP_VERSION)" |
Copilot uses AI. Check for mistakes.
echo "All components have been released with synchronized versions:" >> $GITHUB_STEP_SUMMARY | ||
echo "- Application: ${{ needs.release-please.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
echo "- Chart AppVersion: ${{ needs.release-please.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
echo "- Chart Version: $(echo '${{ needs.release-please.outputs.version }}' | sed 's/^v//')" >> $GITHUB_STEP_SUMMARY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same sed issue as in the validation step. This command assumes the version always has a 'v' prefix, which may not be consistent.
echo "- Chart Version: $(echo '${{ needs.release-please.outputs.version }}' | sed 's/^v//')" >> $GITHUB_STEP_SUMMARY | |
echo "- Chart Version: $(echo '${{ needs.release-please.outputs.version }}' | sed -E 's/^v?([0-9]+\.[0-9]+\.[0-9]+)$/\1/')" >> $GITHUB_STEP_SUMMARY |
Copilot uses AI. Check for mistakes.
CI: Unified Helm Chart Release Synchronization
Summary
This PR implements a unified, automated release process that synchronizes Helm chart releases with the main application releases. It removes legacy, conflicting workflows and consolidates release steps into a single, controlled pipeline.
Unified Release Workflow
The new workflow orchestrates all release components in a coordinated manner:
Key Validation Steps
Version Synchronization Check: Ensures all components have matching versions:
v0.39.0-rc.2
v0.39.0-rc.2
(matches app)0.39.0-rc.2
(app version without 'v' prefix)v0.39.0-rc.2
(matches app)Chart Validation: Helm lint and packaging verification before push
Security: Chart signing with Cosign and signature verification
Release Components
The unified workflow releases all components atomically:
ghcr.io/weaveworks/wego-app
ghcr.io/weaveworks/charts
(OCI format)@weaveworks
scopeChanges
.github/workflows/unified-release.yaml
to orchestrate releases end-to-end:release-please-config.json
:charts
exclusionseparate-pull-requests
to ensure atomic, unified releases.release-please-manifest.json
to a single version entry.github/workflows/prepare-release.yaml
:.github/workflows/helm.yaml
(disabled and then removed).github/workflows/release-please.yaml
(legacy; removed)charts/gitops-server/Chart.yaml
version set to match the app version without thev
prefixScope
Motivation
Testing
helm lint charts/gitops-server/
Risks & Mitigations
Release Notes