Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,12 @@ jobs:
TIKA_VERSION="${{ steps.version.outputs.tag }}"
OUT_DIR=target/tika-grpc-docker

mkdir -p "${OUT_DIR}/libs" "${OUT_DIR}/plugins" "${OUT_DIR}/config" "${OUT_DIR}/bin"
mkdir -p "${OUT_DIR}/libs/tika-grpc" "${OUT_DIR}/plugins" "${OUT_DIR}/config" "${OUT_DIR}/bin"

cp "tika-grpc/target/tika-grpc-${TIKA_VERSION}.jar" "${OUT_DIR}/libs/"
mvn -pl tika-grpc dependency:copy-dependencies \
-DoutputDirectory="${PWD}/${OUT_DIR}/libs/tika-grpc" \
-DincludeScope=runtime -q -B

Comment thread
nddipiazza marked this conversation as resolved.
# Copy tika-pipes plugin zip files
for dir in tika-pipes/tika-pipes-plugins/*/; do
Expand Down
83 changes: 82 additions & 1 deletion .github/workflows/docker-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,32 @@ jobs:
tar xzf "tika-server/tika-server-standard/target/tika-server-standard-${TIKA_VERSION}-bin.tgz" -C "${OUT_DIR}/tika-server"
cp "tika-server/docker-build/minimal/Dockerfile.snapshot" "${OUT_DIR}/Dockerfile"

- name: Build tika-server minimal image for smoke test
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: target/tika-server-minimal-docker
platforms: linux/amd64
load: true
build-args: |
TIKA_VERSION=${{ steps.version.outputs.tika_version }}
tags: tika-server-minimal-smoke:ci

- name: Smoke test tika-server minimal image
run: |
docker run -d --name tika-server-minimal-smoke -p 9998:9998 tika-server-minimal-smoke:ci
for i in $(seq 1 20); do
if docker logs tika-server-minimal-smoke 2>&1 | grep -q "Started Apache Tika server"; then
echo "tika-server minimal started successfully"
docker stop tika-server-minimal-smoke
exit 0
fi
sleep 2
done
echo "ERROR: tika-server minimal did not start within 40 seconds"
docker logs tika-server-minimal-smoke
docker stop tika-server-minimal-smoke
Comment thread
nddipiazza marked this conversation as resolved.
Outdated
exit 1

- name: Build and push tika-server minimal snapshot
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
Expand All @@ -89,6 +115,32 @@ jobs:
tar xzf "tika-server/tika-server-standard/target/tika-server-standard-${TIKA_VERSION}-bin.tgz" -C "${OUT_DIR}/tika-server"
cp "tika-server/docker-build/full/Dockerfile.snapshot" "${OUT_DIR}/Dockerfile"

- name: Build tika-server full image for smoke test
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: target/tika-server-full-docker
platforms: linux/amd64
load: true
build-args: |
TIKA_VERSION=${{ steps.version.outputs.tika_version }}
tags: tika-server-full-smoke:ci

- name: Smoke test tika-server full image
run: |
docker run -d --name tika-server-full-smoke -p 9999:9998 tika-server-full-smoke:ci
for i in $(seq 1 20); do
if docker logs tika-server-full-smoke 2>&1 | grep -q "Started Apache Tika server"; then
echo "tika-server full started successfully"
docker stop tika-server-full-smoke
exit 0
fi
sleep 2
done
echo "ERROR: tika-server full did not start within 40 seconds"
docker logs tika-server-full-smoke
docker stop tika-server-full-smoke
Comment thread
nddipiazza marked this conversation as resolved.
Outdated
exit 1

- name: Build and push tika-server full snapshot
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
Expand All @@ -106,9 +158,12 @@ jobs:
TIKA_VERSION="${{ steps.version.outputs.tika_version }}"
OUT_DIR=target/tika-grpc-docker

mkdir -p "${OUT_DIR}/libs" "${OUT_DIR}/plugins" "${OUT_DIR}/config" "${OUT_DIR}/bin"
mkdir -p "${OUT_DIR}/libs/tika-grpc" "${OUT_DIR}/plugins" "${OUT_DIR}/config" "${OUT_DIR}/bin"

cp "tika-grpc/target/tika-grpc-${TIKA_VERSION}.jar" "${OUT_DIR}/libs/"
mvn -pl tika-grpc dependency:copy-dependencies \
-DoutputDirectory="${PWD}/${OUT_DIR}/libs/tika-grpc" \
-DincludeScope=runtime -q -B

# Copy tika-pipes plugin zip files
for dir in tika-pipes/tika-pipes-plugins/*/; do
Expand All @@ -135,6 +190,32 @@ jobs:
cp "tika-grpc/docker-build/start-tika-grpc.sh" "${OUT_DIR}/bin/"
cp "tika-grpc/docker-build/Dockerfile" "${OUT_DIR}/Dockerfile"

- name: Build tika-grpc image for smoke test
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: target/tika-grpc-docker
platforms: linux/amd64
load: true
build-args: |
VERSION=${{ steps.version.outputs.tika_version }}
tags: tika-grpc-smoke:ci

- name: Smoke test tika-grpc image
run: |
docker run -d --name tika-grpc-smoke -p 9090:9090 tika-grpc-smoke:ci
for i in $(seq 1 15); do
if docker logs tika-grpc-smoke 2>&1 | grep -q "Server started, listening on"; then
echo "tika-grpc started successfully"
docker stop tika-grpc-smoke
exit 0
fi
sleep 2
done
echo "ERROR: tika-grpc did not start within 30 seconds"
docker logs tika-grpc-smoke
docker stop tika-grpc-smoke
Comment thread
nddipiazza marked this conversation as resolved.
Outdated
exit 1

- name: Build and push tika-grpc snapshot
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
Expand Down
2 changes: 1 addition & 1 deletion tika-grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
<manifest>
<mainClass>org.apache.tika.pipes.grpc.TikaGrpcServer</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<classpathPrefix>tika-grpc/</classpathPrefix>
Comment thread
nddipiazza marked this conversation as resolved.
</manifest>
</archive>
</configuration>
Expand Down
Loading