This is an automated email from the ASF dual-hosted git repository.
lewismc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika-helm.git
The following commit(s) were added to refs/heads/main by this push:
new 4f42e0a TIKA-4914 Fix tika-helm daily Docker image version bump CI
for Tika 4.x tags (#41)
4f42e0a is described below
commit 4f42e0a3fc577ad8ea1f7bc4411213701f7b8ec3
Author: Lewis John McGibbney <[email protected]>
AuthorDate: Sat Sep 19 19:56:24 2026 -0700
TIKA-4914 Fix tika-helm daily Docker image version bump CI for Tika 4.x
tags (#41)
---
.github/workflows/install-test-chart.yaml | 4 +-
.github/workflows/lint-test.yaml | 28 +++++++-
.github/workflows/pluto.yaml | 2 +-
.../workflows/publish-artifactory-on-merge.yaml | 2 +-
.github/workflows/release.yaml | 44 +++++++++++--
.github/workflows/tag-release.yaml | 26 ++++++++
.github/workflows/update-tika-version.yaml | 74 ++++++++++++++++++----
README.md | 11 ++++
README.md.gotmpl | 11 ++++
9 files changed, 176 insertions(+), 26 deletions(-)
diff --git a/.github/workflows/install-test-chart.yaml
b/.github/workflows/install-test-chart.yaml
index 4705de8..28ef7a2 100644
--- a/.github/workflows/install-test-chart.yaml
+++ b/.github/workflows/install-test-chart.yaml
@@ -55,10 +55,10 @@ jobs:
ref: ${{ inputs.chart_version != '' && github.sha || inputs.ref }}
- name: Set up Helm
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2
+ uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 #
v5.0.1
- name: Create kind cluster
- uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab #
v1.13.0
+ uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc #
v1.14.0
- name: Log in to Helm OCI and pull chart
if: inputs.chart_version != ''
diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml
index d9115cb..0aaacb8 100644
--- a/.github/workflows/lint-test.yaml
+++ b/.github/workflows/lint-test.yaml
@@ -27,21 +27,43 @@ jobs:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.list-changed.outputs.changed }}
+ env:
+ CT_VERSION: '3.12.0'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Helm
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2
+ uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 #
v5.0.1
+ # Installed manually rather than via helm/chart-testing-action: that
action
+ # pulls astral-sh/setup-uv, which is not on ASF approved_patterns.yml,
so the
+ # workflow is rejected before any job starts. Releases are listed at:
+ # https://github.com/helm/chart-testing/releases
+ # ct reads chart_schema.yaml and lintconf.yaml from /etc/ct; both ship
in the tarball.
- name: Set up chart-testing
- uses:
helm/chart-testing-action@6ec842c01de15ebb84c8627d2744a0c2f2755c9f # v2.8.0
+ run: |
+ set -euo pipefail
+ DEST="$RUNNER_TEMP/ct"
+ mkdir -p "$DEST"
+ curl -fsSL \
+
"https://github.com/helm/chart-testing/releases/download/v${CT_VERSION}/chart-testing_${CT_VERSION}_linux_amd64.tar.gz"
\
+ | tar -xz -C "$DEST"
+ sudo mkdir -p /etc/ct
+ sudo cp "$DEST/etc/chart_schema.yaml" "$DEST/etc/lintconf.yaml"
/etc/ct/
+ echo "$DEST" >> "$GITHUB_PATH"
+
+ # ct lint shells out to yamllint and yamale.
+ pipx install yamllint
+ pipx install yamale
+ echo "$HOME/.local/bin" >> "$GITHUB_PATH"
+ shell: bash
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{
github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
- echo "::set-output name=changed::true"
+ echo "changed=true" >> "$GITHUB_OUTPUT"
fi
shell: bash
- name: Run chart-testing (lint)
diff --git a/.github/workflows/pluto.yaml b/.github/workflows/pluto.yaml
index 6784133..b9c4d0a 100644
--- a/.github/workflows/pluto.yaml
+++ b/.github/workflows/pluto.yaml
@@ -44,7 +44,7 @@ jobs:
chmod +x /usr/local/bin/pluto
shell: bash
- name: Set up Helm
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2
+ uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 #
v5.0.1
- name: verify helm chart
run: |
helm template . | pluto detect -omarkdown - >> $GITHUB_STEP_SUMMARY
diff --git a/.github/workflows/publish-artifactory-on-merge.yaml
b/.github/workflows/publish-artifactory-on-merge.yaml
index 440b15d..600ae6d 100644
--- a/.github/workflows/publish-artifactory-on-merge.yaml
+++ b/.github/workflows/publish-artifactory-on-merge.yaml
@@ -80,7 +80,7 @@ jobs:
shell: bash
- name: Set up Helm
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2
+ uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 #
v5.0.1
- name: Set up JFrog CLI
uses: ./.github/actions/setup-jfrog-cli-manual
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index f04f2b0..6efd963 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -14,7 +14,12 @@
# limitations under the License.
# This workflow creates a GitHub Release and publishes the Helm chart to the
-# Apache JFrog Artifactory Helm OCI repository whenever a v* tag is pushed.
+# Apache JFrog Artifactory Helm OCI repository.
+#
+# Triggers:
+# - push of a v* tag (a human or PAT push; GITHUB_TOKEN tag pushes do not
fire this)
+# - workflow_call from Tag Release on Version Update after an auto-update
merge
+# - workflow_dispatch for an existing tag (recover a missed publish)
#
# Publishing uses JFrog CLI (`jf helm`) so the chart push is tied to
Artifactory
# build-info: CI environment and Git metadata are attached, then the build is
@@ -36,6 +41,23 @@ on:
push:
tags:
- 'v*'
+ workflow_dispatch:
+ inputs:
+ tag:
+ description: 'Existing git tag to release'
+ required: true
+ type: string
+ workflow_call:
+ inputs:
+ tag:
+ description: 'Existing git tag to release'
+ required: true
+ type: string
+ secrets:
+ ARTIFACTORY_USERNAME:
+ required: true
+ ARTIFACTORY_PASSWORD:
+ required: true
permissions:
contents: write
@@ -51,10 +73,22 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
+ - name: Resolve release tag
+ id: rel
+ run: |
+ TAG="${{ inputs.tag }}"
+ if [ -z "$TAG" ]; then
+ TAG="${GITHUB_REF_NAME}"
+ fi
+ echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
+ shell: bash
+
- name: Checkout
uses: actions/checkout@v6
with:
+ ref: ${{ steps.rel.outputs.tag }}
fetch-depth: 0
+ fetch-tags: true
- name: Extract versions from Chart.yaml
id: versions
@@ -68,10 +102,10 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
- tag_name: ${{ github.ref_name }}
- name: "tika-helm ${{ github.ref_name }}"
+ tag_name: ${{ steps.rel.outputs.tag }}
+ name: "tika-helm ${{ steps.rel.outputs.tag }}"
body: |
- ## tika-helm ${{ github.ref_name }}
+ ## tika-helm ${{ steps.rel.outputs.tag }}
**Chart version:** `${{ steps.versions.outputs.chart_version }}`
**App version (Docker image tag):** `${{
steps.versions.outputs.app_version }}`
@@ -86,7 +120,7 @@ jobs:
prerelease: false
- name: Set up Helm
- uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2
+ uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 #
v5.0.1
- name: Set up JFrog CLI
uses: ./.github/actions/setup-jfrog-cli-manual
diff --git a/.github/workflows/tag-release.yaml
b/.github/workflows/tag-release.yaml
index 09a00a6..99d4d0a 100644
--- a/.github/workflows/tag-release.yaml
+++ b/.github/workflows/tag-release.yaml
@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# After an auto-update PR is merged, create v<chart_version> and invoke the
+# Release Helm Chart workflow in-process. A GITHUB_TOKEN tag push does not
+# trigger on.push.tags, so calling the reusable workflow is required.
+
name: Tag Release on Version Update
on:
@@ -29,6 +33,9 @@ jobs:
if: >-
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'auto-update/tika-')
+ outputs:
+ tag: ${{ steps.result.outputs.tag }}
+ should_release: ${{ steps.result.outputs.should_release }}
steps:
- name: Checkout
uses: actions/checkout@v6
@@ -63,3 +70,22 @@ jobs:
git tag -a "$TAG" -m "Release tika-helm $TAG"
git push origin "$TAG"
shell: bash
+
+ - name: Set job outputs
+ id: result
+ run: |
+ echo "tag=v${{ steps.chart-version.outputs.version }}" >>
"$GITHUB_OUTPUT"
+ if [ "${{ steps.check-tag.outputs.exists }}" = "false" ]; then
+ echo "should_release=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "should_release=false" >> "$GITHUB_OUTPUT"
+ fi
+ shell: bash
+
+ publish:
+ needs: tag-release
+ if: needs.tag-release.outputs.should_release == 'true'
+ uses: ./.github/workflows/release.yaml
+ with:
+ tag: ${{ needs.tag-release.outputs.tag }}
+ secrets: inherit
diff --git a/.github/workflows/update-tika-version.yaml
b/.github/workflows/update-tika-version.yaml
index 4cd9c94..cd226d9 100644
--- a/.github/workflows/update-tika-version.yaml
+++ b/.github/workflows/update-tika-version.yaml
@@ -21,7 +21,7 @@ on:
workflow_dispatch:
inputs:
tag:
- description: 'Tika Docker image tag (e.g. 3.3.0.0-full)'
+ description: 'Tika Docker image tag'
required: false
permissions:
@@ -38,21 +38,48 @@ jobs:
- name: Determine new tag
id: new-tag
run: |
+ # Stable -full images only. Exclude SNAPSHOT / alpha / beta / rc /
latest.
+ STABLE_FULL_RE='^([0-9]+\.){2}[0-9]+(\.[0-9]+|-[0-9]+)?-full$'
+
if [ -n "${{ github.event.inputs.tag }}" ]; then
NEW_TAG="${{ github.event.inputs.tag }}"
else
- RESPONSE=$(curl -sf
"https://hub.docker.com/v2/repositories/apache/tika/tags?page_size=10&ordering=last_updated")
|| {
- echo "::error::Failed to fetch tags from DockerHub API"
- exit 1
- }
-
- ALL_TAGS=$(echo "$RESPONSE" | jq -r '.results[].name')
- echo "Tags returned by DockerHub: $ALL_TAGS"
-
- NEW_TAG=$(echo "$ALL_TAGS" \
- | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-full$' \
- | sort -V \
- | tail -1)
+
URL="https://hub.docker.com/v2/repositories/apache/tika/tags?page_size=100&ordering=last_updated"
+ ALL_TAGS=""
+ while [ -n "$URL" ]; do
+ RESPONSE=$(curl -sf "$URL") || {
+ echo "::error::Failed to fetch tags from DockerHub API"
+ exit 1
+ }
+ PAGE_TAGS=$(echo "$RESPONSE" | jq -r '.results[].name // empty')
+ if [ -n "$PAGE_TAGS" ]; then
+ ALL_TAGS="${ALL_TAGS}${PAGE_TAGS}"$'\n'
+ fi
+ URL=$(echo "$RESPONSE" | jq -r '.next // empty')
+ done
+
+ MATCHING=$(printf '%s' "$ALL_TAGS" | grep -E "$STABLE_FULL_RE" ||
true)
+ echo "Stable -full tags from Docker Hub:"
+ echo "$MATCHING"
+
+ # sort -V treats hyphen rebuilds as prereleases. Normalize to
+ # MAJOR.MINOR.PATCH.rebuild so the latest rebuild sorts highest.
+ NEW_TAG=$(
+ printf '%s\n' "$MATCHING" | while IFS= read -r tag || [ -n
"$tag" ]; do
+ [ -z "$tag" ] && continue
+ base="${tag%-full}"
+ if [[ "$base" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ key="${base}.0"
+ elif [[ "$base" =~ ^([0-9]+\.[0-9]+\.[0-9]+)-([0-9]+)$ ]]; then
+ key="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
+ elif [[ "$base" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ key="$base"
+ else
+ continue
+ fi
+ printf '%s\t%s\n' "$key" "$tag"
+ done | sort -V -k1,1 | tail -1 | cut -f2
+ )
fi
if [ -z "$NEW_TAG" ]; then
@@ -60,6 +87,7 @@ jobs:
exit 1
fi
+ echo "Selected tag: $NEW_TAG"
echo "tag=$NEW_TAG" >> "$GITHUB_OUTPUT"
shell: bash
@@ -86,7 +114,25 @@ jobs:
if: steps.compare.outputs.updated == 'true'
id: chart-version
run: |
- CHART_VERSION=$(echo "${{ steps.new-tag.outputs.tag }}" | sed
's/-full$//' | sed 's/\.[0-9]*$//')
+ # Chart version must be SemVer MAJOR.MINOR.PATCH (Artifact Hub /
Helm OCI).
+ # Drop a trailing four-part or hyphen rebuild; never emit a
prerelease.
+ NEW_TAG="${{ steps.new-tag.outputs.tag }}"
+ BASE="${NEW_TAG%-full}"
+ CHART_VERSION=""
+ if [[ "$BASE" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+$ ]]; then
+ CHART_VERSION="${BASH_REMATCH[1]}"
+ elif [[ "$BASE" =~ ^([0-9]+\.[0-9]+\.[0-9]+)-[0-9]+$ ]]; then
+ CHART_VERSION="${BASH_REMATCH[1]}"
+ elif [[ "$BASE" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ CHART_VERSION="$BASE"
+ fi
+
+ if ! [[ "$CHART_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ echo "::error::Could not derive SemVer MAJOR.MINOR.PATCH chart
version from tag ${NEW_TAG}"
+ exit 1
+ fi
+
+ echo "Derived chart version: $CHART_VERSION"
echo "version=$CHART_VERSION" >> "$GITHUB_OUTPUT"
shell: bash
diff --git a/README.md b/README.md
index 25e61cd..a026cb7 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,17 @@ in which case you may need to augment the commands below.
helm install tika oci://apache.jfrog.io/tika-helm/tika --version 3.2.3
--set image.tag=latest-full -n tika-test
```
+* **Chart.yaml dependencies:** Helm appends `name` to `repository`. Set
`repository` to the OCI registry URL:
+
+ ```yaml
+ dependencies:
+ - name: tika
+ version: "<version>"
+ repository: "oci://apache.jfrog.io/tika-helm"
+ ```
+
+ Then `helm dependency update`.
+
Example installation notes:
```text
diff --git a/README.md.gotmpl b/README.md.gotmpl
index 2accbae..fd53dad 100644
--- a/README.md.gotmpl
+++ b/README.md.gotmpl
@@ -57,6 +57,17 @@ in which case you may need to augment the commands below.
helm install tika oci://apache.jfrog.io/tika-helm/tika --version 3.2.3
--set image.tag=latest-full -n tika-test
```
+* **Chart.yaml dependencies:** Helm appends `name` to `repository`. Set
`repository` to the OCI registry URL:
+
+ ```yaml
+ dependencies:
+ - name: tika
+ version: "<version>"
+ repository: "oci://apache.jfrog.io/tika-helm"
+ ```
+
+ Then `helm dependency update`.
+
Example installation notes:
```text