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 0c378e1 TIKA-4678 Create GitHub Action automation to publish
tika-helm to Artfactory on each merge to main branch (#38)
0c378e1 is described below
commit 0c378e1ecf34365fe05ba28e2d0b43d45d678e03
Author: Lewis John McGibbney <[email protected]>
AuthorDate: Fri Apr 3 18:02:51 2026 -0700
TIKA-4678 Create GitHub Action automation to publish tika-helm to
Artfactory on each merge to main branch (#38)
---
.github/ci/tika-endpoint-check-job.yaml | 34 +++++++++++++++++++++++
.github/ci/tika-http-root-check-job.yaml | 33 +++++++++++++++++++++++
.github/workflows/install-test-chart.yaml | 45 +++----------------------------
README.md | 44 +++++++++++++++++-------------
README.md.gotmpl | 44 +++++++++++++++++-------------
5 files changed, 121 insertions(+), 79 deletions(-)
diff --git a/.github/ci/tika-endpoint-check-job.yaml
b/.github/ci/tika-endpoint-check-job.yaml
new file mode 100644
index 0000000..1b0b3ef
--- /dev/null
+++ b/.github/ci/tika-endpoint-check-job.yaml
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Used by .github/workflows/install-test-chart.yaml (post-install /tika
endpoint check).
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: tika-endpoint-check
+spec:
+ backoffLimit: 2
+ template:
+ spec:
+ restartPolicy: Never
+ containers:
+ - name: curl
+ image: curlimages/curl:latest
+ command: ["sh", "-c"]
+ args:
+ - |
+ # GET /tika returns 200 (OK) or 405 (Method Not Allowed) when
endpoint is up
+ code=$(curl -s -o /dev/null -w "%{http_code}"
http://tika:9998/tika)
+ case "$code" in 200|405) exit 0 ;; *) echo "Unexpected /tika
status: $code"; exit 1 ;; esac
diff --git a/.github/ci/tika-http-root-check-job.yaml
b/.github/ci/tika-http-root-check-job.yaml
new file mode 100644
index 0000000..248b7bf
--- /dev/null
+++ b/.github/ci/tika-http-root-check-job.yaml
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Used by .github/workflows/install-test-chart.yaml (post-install HTTP check).
+apiVersion: batch/v1
+kind: Job
+metadata:
+ name: tika-http-root-check
+spec:
+ backoffLimit: 2
+ template:
+ spec:
+ restartPolicy: Never
+ containers:
+ - name: curl
+ image: curlimages/curl:latest
+ command: ["sh", "-c"]
+ args:
+ - |
+ code=$(curl -sf -o /dev/null -w "%{http_code}" http://tika:9998/)
+ [ "$code" = "200" ] || { echo "Expected HTTP 200, got $code";
exit 1; }
diff --git a/.github/workflows/install-test-chart.yaml
b/.github/workflows/install-test-chart.yaml
index ec017a1..4705de8 100644
--- a/.github/workflows/install-test-chart.yaml
+++ b/.github/workflows/install-test-chart.yaml
@@ -48,11 +48,11 @@ jobs:
install-test:
runs-on: ubuntu-latest
steps:
+ # Always checkout: local chart install needs sources; OCI path needs
.github/ci manifests.
- name: Checkout
- if: inputs.chart_version == ''
uses: actions/checkout@v6
with:
- ref: ${{ inputs.ref }}
+ ref: ${{ inputs.chart_version != '' && github.sha || inputs.ref }}
- name: Set up Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2
@@ -90,49 +90,12 @@ jobs:
- name: Verify Tika HTTP root
run: |
- sed 's/^ //' <<'JOB' | kubectl apply -f - -n tika-test
- apiVersion: batch/v1
- kind: Job
- metadata:
- name: tika-http-root-check
- spec:
- backoffLimit: 2
- template:
- spec:
- restartPolicy: Never
- containers:
- - name: curl
- image: curlimages/curl:latest
- command: ["sh", "-c"]
- args:
- - |
- code=$(curl -sf -o /dev/null -w "%{http_code}"
http://tika:9998/)
- [ "$code" = "200" ] || { echo "Expected HTTP 200, got
$code"; exit 1; }
- JOB
+ kubectl apply -f .github/ci/tika-http-root-check-job.yaml -n
tika-test
kubectl wait --for=condition=complete job/tika-http-root-check -n
tika-test --timeout=120s
kubectl delete job tika-http-root-check -n tika-test
--ignore-not-found
- name: Verify Tika /tika endpoint
run: |
- sed 's/^ //' <<'JOB' | kubectl apply -f - -n tika-test
- apiVersion: batch/v1
- kind: Job
- metadata:
- name: tika-endpoint-check
- spec:
- backoffLimit: 2
- template:
- spec:
- restartPolicy: Never
- containers:
- - name: curl
- image: curlimages/curl:latest
- command: ["sh", "-c"]
- args:
- - |
- # GET /tika returns 200 (OK) or 405 (Method Not
Allowed) when endpoint is up
- code=$(curl -s -o /dev/null -w "%{http_code}"
http://tika:9998/tika)
- case "$code" in 200|405) exit 0 ;; *) echo "Unexpected
/tika status: $code"; exit 1 ;; esac
- JOB
+ kubectl apply -f .github/ci/tika-endpoint-check-job.yaml -n tika-test
kubectl wait --for=condition=complete job/tika-endpoint-check -n
tika-test --timeout=120s
kubectl delete job tika-endpoint-check -n tika-test
--ignore-not-found
diff --git a/README.md b/README.md
index 5d692ea..9a461b6 100644
--- a/README.md
+++ b/README.md
@@ -52,28 +52,34 @@ in which case you may need to augment the commands below.
* Install from OCI (replace `<version>` with the chart version you want, e.g.
`3.2.3`):
- with Helm 3: `helm install tika oci://apache.jfrog.io/tika-helm/tika
--version <version> --set image.tag=<app-version> -n tika-test`
- Example:
-```
-helm install tika oci://apache.jfrog.io/tika-helm/tika --version 3.2.3 --set
image.tag=latest-full -n tika-test
-```
-...
-NAME: tika
-LAST DEPLOYED: Mon Jan 24 13:38:01 2022
-NAMESPACE: tika-test
-STATUS: deployed
-REVISION: 1
-NOTES:
-1. Get the application URL by running these commands:
- export POD_NAME=$(kubectl get pods --namespace tika-test -l
"app.kubernetes.io/name=tika,app.kubernetes.io/instance=tika" -o
jsonpath="{.items[0].metadata.name}")
- export CONTAINER_PORT=$(kubectl get pod --namespace tika-test $POD_NAME -o
jsonpath="{.spec.containers[0].ports[0].containerPort}")
- echo "Visit http://127.0.0.1:9998 to use your application"
- kubectl --namespace tika-test port-forward $POD_NAME 9998:$CONTAINER_PORT
-```
-You may notice that the _kubectl port forwarding_ experiences a _timeout
issue_ which ultimately kills the app. In this case you can run port formarding
in a loop
-```
+ ```console
+ helm install tika oci://apache.jfrog.io/tika-helm/tika --version 3.2.3
--set image.tag=latest-full -n tika-test
+ ```
+
+ Example installation notes:
+
+ ```text
+ NAME: tika
+ LAST DEPLOYED: Mon Jan 24 13:38:01 2022
+ NAMESPACE: tika-test
+ STATUS: deployed
+ REVISION: 1
+ NOTES:
+ 1. Get the application URL by running these commands:
+ export POD_NAME=$(kubectl get pods --namespace tika-test -l
"app.kubernetes.io/name=tika,app.kubernetes.io/instance=tika" -o
jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace tika-test $POD_NAME
-o jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "Visit http://127.0.0.1:9998 to use your application"
+ kubectl --namespace tika-test port-forward $POD_NAME 9998:$CONTAINER_PORT
+ ```
+
+You may notice that the _kubectl port forwarding_ experiences a _timeout
issue_ which ultimately kills the app. In this case you can run port forwarding
in a loop:
+
+```console
while true; do kubectl --namespace tika-test port-forward $POD_NAME
9998:$CONTAINER_PORT ; done
```
-... this should keep `kubectl` reconnecting on connection lost.
+
+This should keep `kubectl` reconnecting on connection lost.
**Note:** The classic Helm repository (`helm repo add tika
https://apache.jfrog.io/artifactory/tika`) is deprecated. Official releases and
`main`-branch snapshot charts are published to the Helm OCI repository above.
diff --git a/README.md.gotmpl b/README.md.gotmpl
index 9dfb527..2accbae 100644
--- a/README.md.gotmpl
+++ b/README.md.gotmpl
@@ -52,28 +52,34 @@ in which case you may need to augment the commands below.
* Install from OCI (replace `<version>` with the chart version you want, e.g.
`3.2.3`):
- with Helm 3: `helm install tika oci://apache.jfrog.io/tika-helm/tika
--version <version> --set image.tag=<app-version> -n tika-test`
- Example:
-```
-helm install tika oci://apache.jfrog.io/tika-helm/tika --version 3.2.3 --set
image.tag=latest-full -n tika-test
-```
-...
-NAME: tika
-LAST DEPLOYED: Mon Jan 24 13:38:01 2022
-NAMESPACE: tika-test
-STATUS: deployed
-REVISION: 1
-NOTES:
-1. Get the application URL by running these commands:
- export POD_NAME=$(kubectl get pods --namespace tika-test -l
"app.kubernetes.io/name=tika,app.kubernetes.io/instance=tika" -o
jsonpath="{.items[0].metadata.name}")
- export CONTAINER_PORT=$(kubectl get pod --namespace tika-test $POD_NAME -o
jsonpath="{.spec.containers[0].ports[0].containerPort}")
- echo "Visit http://127.0.0.1:9998 to use your application"
- kubectl --namespace tika-test port-forward $POD_NAME 9998:$CONTAINER_PORT
-```
-You may notice that the _kubectl port forwarding_ experiences a _timeout
issue_ which ultimately kills the app. In this case you can run port formarding
in a loop
-```
+ ```console
+ helm install tika oci://apache.jfrog.io/tika-helm/tika --version 3.2.3
--set image.tag=latest-full -n tika-test
+ ```
+
+ Example installation notes:
+
+ ```text
+ NAME: tika
+ LAST DEPLOYED: Mon Jan 24 13:38:01 2022
+ NAMESPACE: tika-test
+ STATUS: deployed
+ REVISION: 1
+ NOTES:
+ 1. Get the application URL by running these commands:
+ export POD_NAME=$(kubectl get pods --namespace tika-test -l
"app.kubernetes.io/name=tika,app.kubernetes.io/instance=tika" -o
jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace tika-test $POD_NAME
-o jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "Visit http://127.0.0.1:9998 to use your application"
+ kubectl --namespace tika-test port-forward $POD_NAME 9998:$CONTAINER_PORT
+ ```
+
+You may notice that the _kubectl port forwarding_ experiences a _timeout
issue_ which ultimately kills the app. In this case you can run port forwarding
in a loop:
+
+```console
while true; do kubectl --namespace tika-test port-forward $POD_NAME
9998:$CONTAINER_PORT ; done
```
-... this should keep `kubectl` reconnecting on connection lost.
+
+This should keep `kubectl` reconnecting on connection lost.
**Note:** The classic Helm repository (`helm repo add tika
https://apache.jfrog.io/artifactory/tika`) is deprecated. Official releases and
`main`-branch snapshot charts are published to the Helm OCI repository above.