This is an automated email from the ASF dual-hosted git repository.

adutra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 105609877 Add Artifact Hub metadata and version-specific Helm chart 
updates to release process (#3796)
105609877 is described below

commit 1056098772d0153c5eb3805ec52303c07ba3512d
Author: Alexandre Dutra <[email protected]>
AuthorDate: Sat Feb 28 15:13:02 2026 +0100

    Add Artifact Hub metadata and version-specific Helm chart updates to 
release process (#3796)
    
    Updated release workflows and manual guide to:
    
    - Set Helm chart image.tag and documentation link to the release version
    - Include artifacthub-repo.yml in the Helm chart repository
---
 .../release-3-build-and-publish-artifacts.yml      | 10 +++++++--
 .github/workflows/release-4-publish-release.yml    | 20 ++++++++++--------
 helm/polaris/.helmignore                           |  2 ++
 helm/polaris/values.yaml                           |  2 +-
 releasey/libs/_version.sh                          |  2 ++
 .../release-guides/manual-release-guide.md         | 24 ++++++++++++++--------
 6 files changed, 40 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/release-3-build-and-publish-artifacts.yml 
b/.github/workflows/release-3-build-and-publish-artifacts.yml
index 95b4a04cf..7b7f4c845 100644
--- a/.github/workflows/release-3-build-and-publish-artifacts.yml
+++ b/.github/workflows/release-3-build-and-publish-artifacts.yml
@@ -477,9 +477,14 @@ jobs:
           # Copy the updated index.yaml to the dist dev directory
           exec_process cp "$WORK_DIR/index.yaml" 
"${dist_dev_dir}/helm-chart/index.yaml"
 
-          # Commit the updated index
+          # Copy the artifacthub-repo.yml to the dist dev directory
+          exec_process cp "helm/polaris/artifacthub-repo.yml" 
"${dist_dev_dir}/helm-chart/artifacthub-repo.yml"
+
           exec_process cd "${dist_dev_dir}"
-          exec_process svn commit --username "$SVN_USERNAME" --password 
"$SVN_PASSWORD" --non-interactive -m "Update Helm index for 
${version_without_rc} RC${rc_number}"
+          # Add artifacthub-repo.yml if not already versioned
+          exec_process svn add helm-chart/artifacthub-repo.yml || true
+          # Commit the updated index and artifacthub-repo.yml
+          exec_process svn commit --username "$SVN_USERNAME" --password 
"$SVN_PASSWORD" --non-interactive -m "Update Helm index and 
artifacthub-repo.yml for ${version_without_rc} RC${rc_number}"
 
           echo "## Helm Index Summary" >> $GITHUB_STEP_SUMMARY
           ARCHIVE_COUNT=$(echo "$ARCHIVE_VERSIONS" | grep -v '^$' | wc -w | tr 
-d ' ')
@@ -491,6 +496,7 @@ jobs:
           | Charts from archive.apache.org | ✅ ${ARCHIVE_COUNT} versions 
indexed |
           | Current RC | ✅ ${version_without_rc} added with relative URL |
           | Helm index | ✅ Committed to dist dev |
+          | Artifact Hub metadata | ✅ Committed to dist dev |
           EOT
 
   generate-release-email:
diff --git a/.github/workflows/release-4-publish-release.yml 
b/.github/workflows/release-4-publish-release.yml
index 0850c9912..4a55f0560 100644
--- a/.github/workflows/release-4-publish-release.yml
+++ b/.github/workflows/release-4-publish-release.yml
@@ -260,7 +260,7 @@ jobs:
             echo "No old Helm chart versions found to remove" >> 
$GITHUB_STEP_SUMMARY
           fi
 
-      - name: Transfer Helm index from dev to release
+      - name: Transfer Helm index and artifacthub-repo.yml from dev to release
         env:
           SVN_USERNAME: ${{ secrets.POLARIS_SVN_DEV_USERNAME }}
           SVN_PASSWORD: ${{ secrets.POLARIS_SVN_DEV_PASSWORD }}
@@ -270,20 +270,22 @@ jobs:
           source "${LIBS_DIR}/_constants.sh"
           source "${LIBS_DIR}/_exec.sh"
 
-          # Define source and destination URLs for the Helm index
-          
dev_helm_index_url="${APACHE_DIST_URL}/dev/polaris/helm-chart/index.yaml"
-          
release_helm_index_url="${APACHE_DIST_URL}/release/polaris/helm-chart/index.yaml"
+          # Define source and destination URLs
+          dev_helm_chart_url="${APACHE_DIST_URL}/dev/polaris/helm-chart"
+          
release_helm_chart_url="${APACHE_DIST_URL}/release/polaris/helm-chart"
 
-          # Move the index.yaml from dev to release
+          # Move index.yaml and artifacthub-repo.yml from dev to release
           # The index was already properly generated in workflow 3 with 
relative URLs for the current
           # release and absolute URLs to archive.apache.org for previous 
releases, so we just transfer it as-is
           exec_process svn mv --username "$SVN_USERNAME" --password 
"$SVN_PASSWORD" --non-interactive \
-            "${dev_helm_index_url}" "${release_helm_index_url}" \
-            -m "Transfer Helm index for ${version_without_rc} release"
+            "${dev_helm_chart_url}/index.yaml" \
+            "${dev_helm_chart_url}/artifacthub-repo.yml" \
+            "${release_helm_chart_url}/" \
+            -m "Transfer Helm index and artifacthub-repo.yml for 
${version_without_rc} release"
 
           cat <<EOT >> $GITHUB_STEP_SUMMARY
-          ## Helm Index
-          Helm index transferred from dist dev to dist release
+          ## Helm Repository Metadata
+          Helm index and artifacthub-repo.yml transferred from dist dev to 
dist release
           EOT
 
       - name: Create final release tag and push to Git repository
diff --git a/helm/polaris/.helmignore b/helm/polaris/.helmignore
index 358ec0296..be7fd14f2 100644
--- a/helm/polaris/.helmignore
+++ b/helm/polaris/.helmignore
@@ -40,5 +40,7 @@
 .idea/
 *.tmproj
 .vscode/
+# Helm chart testing, CI and release management
 ci/
 tests/
+artifacthub-repo.yml
diff --git a/helm/polaris/values.yaml b/helm/polaris/values.yaml
index 2bce3c2b4..f33678e35 100644
--- a/helm/polaris/values.yaml
+++ b/helm/polaris/values.yaml
@@ -34,7 +34,7 @@ image:
   pullPolicy: IfNotPresent
   # -- The image tag.
   # @section -- Image
-  tag: "latest"
+  tag: "latest"  # This tag will be replaced with the chart version at release 
time.
   # -- The path to the directory where the application.properties file, and 
other configuration
   # files, if any, should be mounted.
   # @section -- Image
diff --git a/releasey/libs/_version.sh b/releasey/libs/_version.sh
index b5724f0b9..fbeb8ec6a 100644
--- a/releasey/libs/_version.sh
+++ b/releasey/libs/_version.sh
@@ -108,6 +108,7 @@ function update_helm_version {
   local new_version="$1"
   exec_process sed -E -i~ "s/^version: .+/version: ${new_version}/g" 
"$HELM_CHART_YAML_FILE"
   exec_process sed -E -i~ "s/^appVersion: .+/appVersion: ${new_version}/g" 
"$HELM_CHART_YAML_FILE"
+  exec_process sed -E -i~ "/- name: Documentation/{n;s|url: 
https://polaris.apache.org/$|url: 
https://polaris.apache.org/releases/${new_version}/|;}" "$HELM_CHART_YAML_FILE"
   exec_process sed -E -i~ 
"s/[0-9]+[.][0-9]+([.][0-9]+)?(-incubating)?-SNAPSHOT/${new_version}/g" 
"$HELM_README_FILE"
   # The readme file may contain version with double dash for shields.io badges
   # We need a second `sed` command to ensure that the version replacement 
preserves this double-dash syntax.
@@ -118,6 +119,7 @@ function update_helm_version {
   exec_process sed -E -i~ 
"s/[0-9]+[.][0-9]+([.][0-9]+)?(--incubating)?--SNAPSHOT/${version_with_dash}/g" 
"$HELM_README_FILE"
   exec_process sed -E -i~ "s|/in-dev/unreleased/|/releases/${new_version}/|g" 
"$HELM_VALUES_FILE"
   exec_process sed -E -i~ "s|/in-dev/unreleased/|/releases/${new_version}/|g" 
"$HELM_VALUES_SCHEMA_FILE"
+  exec_process sed -E -i~ 's/^(  tag: )"latest".*$/\1"'"${new_version}"'"/' 
"$HELM_VALUES_FILE"
 }
 
 function find_next_rc_number {
diff --git a/site/content/community/release-guides/manual-release-guide.md 
b/site/content/community/release-guides/manual-release-guide.md
index 139bf8bc3..87f370cc4 100644
--- a/site/content/community/release-guides/manual-release-guide.md
+++ b/site/content/community/release-guides/manual-release-guide.md
@@ -139,8 +139,13 @@ echo "x.y.z" > version.txt
 
 and update the version in the Helm Chart in:
 
-* `helm/polaris/Chart.yaml`
+* `helm/polaris/Chart.yaml` 
+  - update `version` and `appVersion` fields
+  - update the `Documentation` link in the `artifacthub.io/links` annotation 
to point to 
+    `https://polaris.apache.org/releases/x.y.z/`
 * `helm/polaris/README.md`
+* `helm/polaris/values.yaml` 
+  - update the `image.tag` field from `"latest"` to `"x.y.z"`
 
 and update the documentation URLs in `helm/polaris/values.yaml` and 
`helm/polaris/values.schema.json` to point to the released documentation.
 Replace `/in-dev/unreleased/` with `/releases/x.y.z/` in all documentation 
URLs, for example:
@@ -255,14 +260,18 @@ cp ../helm/*.tgz*  helm-chart/x.y.z
 svn add helm-chart/x.y.z
 ```
 
-You can now update the Helm index:
+You can now update the Helm index and copy the Artifact Hub metadata:
 
 ```
 cd helm-chart
 helm repo index .
 svn add index.yaml
+cp /path/to/polaris/github/clone/repo/helm/polaris/artifacthub-repo.yml .
+svn add artifacthub-repo.yml
 ```
 
+Note: `artifacthub-repo.yml` only needs to be added with `svn add` on the 
first release. On subsequent releases, it will already be versioned and the 
`cp` command will update it.
+
 Dist repository is now "complete" and we can push/commit:
 
 ```
@@ -370,14 +379,13 @@ svn mv 
https://dist.apache.org/repos/dist/dev/polaris/x.y.z https://dist.apache.
 svn mv https://dist.apache.org/repos/dist/dev/polaris/helm-chart/x.y.z 
https://dist.apache.org/repos/dist/release/polaris/helm-chart
 ```
 
-Then, update the Helm Chart repository index on 
https://dist.apache.org/repos/dist/release/polaris/helm-chart/index.yaml:
+Then, transfer the Helm index and Artifact Hub metadata from dist dev to dist 
release:
 
 ```
-svn checkout https://dist.apache.org/repos/dist/release/polaris/helm-chart 
polaris-dist-release-helm-chart
-cd polaris-dist-release-helm-chart
-helm repo index .
-svn add index.yaml
-svn commit -m "Update Helm index for x.y.z release"
+svn mv https://dist.apache.org/repos/dist/dev/polaris/helm-chart/index.yaml \
+  
https://dist.apache.org/repos/dist/dev/polaris/helm-chart/artifacthub-repo.yml \
+  https://dist.apache.org/repos/dist/release/polaris/helm-chart/ \
+  -m "Transfer Helm index and artifacthub-repo.yml for x.y.z release"
 ```
 
 Next, add a release tag to the git repository based on the candidate tag:

Reply via email to