-
Notifications
You must be signed in to change notification settings - Fork 312
/
Copy pathapache-pulsar.yaml
137 lines (121 loc) · 3.58 KB
/
apache-pulsar.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package:
name: apache-pulsar
version: "4.0.3"
epoch: 0
description: Pulsar is a distributed pub-sub messaging platform with a very flexible messaging model and an intuitive client API.
copyright:
- license: Apache-2.0
dependencies:
runtime:
- bash
- libstdc++
- openjdk-21-jre
- openssl
- procps
environment:
contents:
packages:
- busybox
- maven
- openjdk-21-default-jdk
pipeline:
- uses: git-checkout
with:
repository: https://github.com/apache/pulsar
tag: v${{package.version}}
expected-commit: e5aa85f0afb65ca002881efd6f6f52f63b17db15
- uses: patch
with:
patches: bouncy-castle-bcfips.patch
- uses: maven/pombump
- name: Build
runs: ./mvnw package -DskipTests
- name: Install
runs: |
dest=${{targets.contextdir}}/usr/share/java/pulsar
mkdir -p ${dest}
tar -zxf ./distribution/server/target/${{package.name}}-${{package.version}}-bin.tar.gz -C ${dest} --strip-components=1
rm -rf ${dest}/bin/*.cmd
- uses: strip
subpackages:
- name: ${{package.name}}-compat
pipeline:
- runs: ln -s /usr/share/java/pulsar ${{targets.contextdir}}/pulsar
update:
enabled: true
ignore-regex-patterns:
- .*candidate.*
github:
identifier: apache/pulsar
use-tag: true
strip-prefix: v
tag-filter: v
test:
environment:
contents:
packages:
- ${{package.name}}-compat
- bash
- libstdc++
- procps
environment:
JAVA_HOME: /usr/lib/jvm/java-21-openjdk
PATH: /usr/lib/jvm/java-21-openjdk/bin:$PATH
pipeline:
- name: Test that all CLI tools are at least installed
runs: |
cd /pulsar
bin/bookkeeper --help
bin/pulsar --help
bin/pulsar-admin --help
bin/pulsar-client --help
bin/pulsar-daemon --help | grep 'Usage: pulsar-daemon'
bin/pulsar-perf --help
bin/pulsar-shell --help | grep 'Usage: pulsar-shell'
- name: Test standalone server as main process
uses: test/daemon-check-output
with:
start: /pulsar/bin/pulsar standalone
expected_output: |
"c-standalone-fw-localhost-8080" : {
"originalNumAssignments" : 0,
"finalNumAssignments" : 0,
"instancesAdded" : 0,
"instancesRemoved" : 0,
"instancesUpdated" : 0,
"alive" : true
error_strings: |
"msg":"error"
"level":"error"
"panic"
"fatal"
failed
Error:
error:
denied
- name: Test standalone as background process / create topic / produce and consume message
uses: test/daemon-check-output
with:
start: /pulsar/bin/pulsar-daemon start standalone
expected_output: |
doing start standalone ...
starting standalone, logging to
error_strings: |
"msg":"error"
"level":"error"
"panic"
"fatal"
failed
Error:
error:
denied
post: |
cd /pulsar
# Wait for standalone server to be ready
sleep 5
# Test creating a topic (gives no output on success)
bin/pulsar-admin topics create persistent://public/default/test-topic
# Test producing a message
bin/pulsar-client produce test-topic --messages "Hello Chainguard!" | grep "1 messages successfully produced"
# Test consuming one message
bin/pulsar-client consume test-topic -s my-subscription -p Earliest -n 1 | grep "content:Hello Chainguard!"