-
Notifications
You must be signed in to change notification settings - Fork 315
/
Copy pathapache-tika-3.1.yaml
93 lines (84 loc) · 2.74 KB
/
apache-tika-3.1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package:
name: apache-tika-3.1
version: "3.1.0"
epoch: 2
description: The Apache Tika toolkit detects and extracts metadata and text from over a thousand different file types (such as PPT, XLS, and PDF).
copyright:
- license: Apache-2.0
dependencies:
runtime:
- dash-binsh
- openjdk-17-default-jvm
provides:
- apache-tika=${{package.full-version}}
environment:
contents:
packages:
- bash
- build-base
- busybox
- coreutils
- fontconfig-config
- fontconfig-dev
- lcms2
- libfontconfig1
- libjpeg-turbo
- maven
- openjdk-17-default-jdk
pipeline:
- uses: git-checkout
with:
repository: https://github.com/apache/tika
tag: ${{package.version}}
expected-commit: 25619272d2f615df4ad87e27e7c8dec576f37627
- uses: maven/pombump
with:
properties-file: pombump-properties.yaml
- runs: |
mvn clean install -am -DskipTests -Dossindex.skip
mkdir -p "${{targets.contextdir}}"/usr/share/java/
cp -r tika-server/tika-server-standard/target/tika-server-standard-${{package.version}}.jar "${{targets.contextdir}}"/usr/share/java/tika-server-standard-${{package.version}}.jar
subpackages:
- name: "${{package.name}}-compat"
description: "Compatibility package to place binaries in the root folder"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"
ln -sf /usr/share/java/tika-server-standard-${{package.version}}.jar ${{targets.subpkgdir}}/tika-server-standard.jar
update:
enabled: true
github:
identifier: apache/tika
use-tag: true
tag-filter: 3.1.
test:
environment:
contents:
packages:
- curl
- ${{package.name}}-compat
- openjdk-17-default-jvm
pipeline:
- uses: test/daemon-check-output
with:
start: java -jar /tika-server-standard.jar
expected_output: |
Started Apache Tika server
post: |
fail() { echo "FATAL: $*"; exit 1; }
tmpd=$(mktemp -d)
trap "rm -Rf $tmpd" EXIT
url=http://localhost:9998/
curl -s "$url" > "$tmpd/req.out" 2>"$tmpd/req.err" ||
fail "[$?] curl -s $url"
grep -q "Welcome to the Apache Tika" "$tmpd/req.out" ||
fail "curl $url - no Welcome message"
msg="this is a test file"
echo "$msg" > "$tmpd/sample.txt" ||
fail "failed writing a file"
curl -X PUT --data-binary "@$tmpd/sample.txt" \
-H "Content-Type: text/plain" "http://localhost:9998/tika" \
> "$tmpd/post.out" ||
fail "failed PUT to curl $url/tika"
grep -q "$msg" "$tmpd/post.out" ||
fail "did not find $msg in output of PUT"