pulsar-client 1.13.2 → 1.14.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/index.d.ts +17 -0
  2. package/package.json +1 -1
  3. package/pulsar-client-1.14.0-rc.1.tgz +0 -0
  4. package/src/Client.cc +2 -1
  5. package/src/Client.h +1 -0
  6. package/src/ConsumerConfig.cc +66 -0
  7. package/.clang-format +0 -26
  8. package/.eslintignore +0 -21
  9. package/.eslintrc.json +0 -22
  10. package/.github/PULL_REQUEST_TEMPLATE.md +0 -85
  11. package/.github/workflows/ci-build-release-napi.yml +0 -211
  12. package/.github/workflows/ci-pr-validation.yml +0 -334
  13. package/build-support/download-release-artifacts.py +0 -77
  14. package/build-support/generate-source-archive.sh +0 -28
  15. package/build-support/pulsar-test-container-start.sh +0 -43
  16. package/build-support/pulsar-test-service-start.sh +0 -39
  17. package/build-support/pulsar-test-service-stop.sh +0 -32
  18. package/build-support/sign-files.sh +0 -32
  19. package/build-support/stage-release.sh +0 -44
  20. package/docs/release-process.md +0 -291
  21. package/examples/certificate/private-key.client-rsa.pem +0 -27
  22. package/examples/certificate/public-key.client-rsa.pem +0 -9
  23. package/examples/consumer-schema.js +0 -66
  24. package/examples/consumer.js +0 -46
  25. package/examples/consumer_listener.js +0 -44
  26. package/examples/consumer_tls_auth.js +0 -51
  27. package/examples/consummer_token_auth.js +0 -50
  28. package/examples/consummer_token_auth_supplier.js +0 -56
  29. package/examples/custom_logger.js +0 -60
  30. package/examples/encryption-consumer.js +0 -47
  31. package/examples/encryption-producer.js +0 -50
  32. package/examples/encryption-reader.js +0 -44
  33. package/examples/producer-schema.js +0 -76
  34. package/examples/producer.js +0 -48
  35. package/examples/producer_tls_auth.js +0 -52
  36. package/examples/producer_token_auth.js +0 -48
  37. package/examples/producer_token_auth_supplier.js +0 -53
  38. package/examples/reader.js +0 -43
  39. package/examples/reader_listener.js +0 -37
  40. package/license-checker-config.json +0 -43
  41. package/license-header.txt +0 -16
  42. package/perf/perf_consumer.js +0 -103
  43. package/perf/perf_producer.js +0 -118
  44. package/pkg/linux/Dockerfile_linux_glibc +0 -31
  45. package/pkg/linux/Dockerfile_linux_musl +0 -32
  46. package/pkg/linux/build-napi-inside-docker.sh +0 -31
  47. package/pkg/linux/download-cpp-client.sh +0 -65
  48. package/pkg/load_test.js +0 -34
  49. package/pkg/mac/download-cpp-client.sh +0 -36
  50. package/pkg/windows/download-cpp-client.bat +0 -12
  51. package/tests/certificate/private-key.client-rsa.pem +0 -27
  52. package/tests/certificate/public-key.client-rsa.pem +0 -9
  53. package/tests/certificate/server.crt +0 -20
  54. package/tests/certificate/server.key +0 -28
  55. package/tests/client.test.js +0 -122
  56. package/tests/conf/standalone.conf +0 -308
  57. package/tests/consumer.test.js +0 -434
  58. package/tests/docker-load-test.sh +0 -35
  59. package/tests/end_to_end.test.js +0 -1447
  60. package/tests/http_utils.js +0 -45
  61. package/tests/load-test.sh +0 -43
  62. package/tests/producer.test.js +0 -160
  63. package/tests/reader.test.js +0 -175
  64. package/tests/run-unit-tests.sh +0 -35
  65. package/tsconfig.json +0 -22
  66. package/tslint.json +0 -9
  67. package/tstest.ts +0 -408
  68. package/typedoc.json +0 -15
@@ -1,334 +0,0 @@
1
- #
2
- # Licensed to the Apache Software Foundation (ASF) under one
3
- # or more contributor license agreements. See the NOTICE file
4
- # distributed with this work for additional information
5
- # regarding copyright ownership. The ASF licenses this file
6
- # to you under the Apache License, Version 2.0 (the
7
- # "License"); you may not use this file except in compliance
8
- # with the License. You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing,
13
- # software distributed under the License is distributed on an
14
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- # KIND, either express or implied. See the License for the
16
- # specific language governing permissions and limitations
17
- # under the License.
18
- #
19
- name: PR validation
20
- on:
21
- pull_request:
22
- branches: ['master']
23
-
24
- concurrency:
25
- group: ${{ github.workflow }}-${{ github.ref }}
26
- cancel-in-progress: true
27
-
28
- jobs:
29
- unit-tests:
30
- name: Run unit tests
31
- runs-on: ubuntu-22.04
32
- timeout-minutes: 120
33
- strategy:
34
- matrix:
35
- python:
36
- - "3.10"
37
-
38
- steps:
39
- - uses: actions/checkout@v3
40
- - name: Use Node.js 18
41
- uses: actions/setup-node@v3
42
- with:
43
- node-version: 18
44
-
45
- - name: Use Python ${{ matrix.python }}
46
- uses: actions/setup-python@v3
47
- with:
48
- python-version: ${{ matrix.python }}
49
-
50
- - name: Run Test
51
- run: |
52
- ./tests/run-unit-tests.sh
53
- - name: Check license headers
54
- run: |
55
- npm run license:checkheader
56
-
57
- validation-yarn:
58
- name: Validation use yarn install
59
- runs-on: ubuntu-22.04
60
- timeout-minutes: 120
61
-
62
- steps:
63
- - uses: actions/checkout@v3
64
- - name: Use Node.js 18
65
- uses: actions/setup-node@v3
66
- with:
67
- node-version: 18
68
-
69
- - name: Use yarn install
70
- run: |
71
- yarn install --ignore-scripts
72
-
73
- macos-napi:
74
- name: Build NAPI macos - Node ${{matrix.nodejs}} - ${{matrix.arch}}
75
- runs-on: ${{ matrix.os }}
76
- timeout-minutes: 3000
77
-
78
- strategy:
79
- fail-fast: false
80
- matrix:
81
- arch:
82
- - x64
83
- - arm64
84
- nodejs:
85
- - 18
86
- python:
87
- - "3.10"
88
- include:
89
- - arch: x64
90
- os: macos-13
91
- - arch: arm64
92
- # macos-14 is used for arm64
93
- os: macos-14
94
- steps:
95
- - uses: actions/checkout@v3
96
- - name: Use Node.js ${{ matrix.nodejs }}
97
- uses: actions/setup-node@v3
98
- with:
99
- node-version: ${{ matrix.nodejs }}
100
- cache: 'npm'
101
-
102
- - name: Use Python ${{ matrix.python }}
103
- uses: actions/setup-python@v3
104
- with:
105
- python-version: ${{ matrix.python }}
106
-
107
- - name: Build Node binaries lib
108
- run: |
109
- if [ "${{ matrix.arch }}" = "x64" ]; then
110
- export ARCH=x86_64
111
- else
112
- export ARCH=${{ matrix.arch }}
113
- fi
114
- pkg/mac/download-cpp-client.sh
115
- npm install --ignore-scripts
116
- npx node-pre-gyp configure --target_arch=${{ matrix.arch }}
117
- npx node-pre-gyp build --target_arch=${{ matrix.arch }}
118
-
119
- - name: Test loading Node binaries lib
120
- run: |
121
- node pkg/load_test.js
122
-
123
- - name: Package Node binaries lib
124
- run: |
125
- npx node-pre-gyp package --target_arch=${{ matrix.arch }}
126
-
127
- linux-napi:
128
- name: Build NAPI ${{matrix.image}} - Node ${{matrix.nodejs}} - ${{matrix.cpu.platform}}
129
- runs-on: ubuntu-22.04
130
- timeout-minutes: 3000
131
-
132
- strategy:
133
- fail-fast: false
134
- matrix:
135
- image:
136
- - 'linux_glibc'
137
- - 'linux_musl'
138
- nodejs:
139
- - 18
140
- cpu:
141
- - {arch: 'x86_64', platform: 'x86_64'}
142
- - {arch: 'aarch64', platform: 'arm64'}
143
-
144
- steps:
145
- - name: checkout
146
- uses: actions/checkout@v3
147
-
148
- - name: Set up QEMU
149
- uses: docker/setup-qemu-action@v2
150
-
151
- - name: Setup Docker Buildx
152
- uses: docker/setup-buildx-action@v2
153
-
154
- - name: Build Linux Docker image
155
- uses: docker/build-push-action@v3
156
- with:
157
- file: ./pkg/linux/Dockerfile_${{matrix.image}}
158
- load: true
159
- tags: build:latest
160
- platforms: linux/${{matrix.cpu.arch}}
161
- build-args: |
162
- PLATFORM=${{matrix.cpu.platform}}
163
- ARCH=${{matrix.cpu.arch}}
164
- NODE_VERSION=${{matrix.nodejs}}
165
- cache-from: type=gha
166
- cache-to: type=gha,mode=max
167
-
168
- - name: Build and Test NAPI file
169
- run: |
170
- docker run -i -v $PWD:/pulsar-client-node build:latest \
171
- /pulsar-client-node/pkg/linux/build-napi-inside-docker.sh
172
-
173
- - name: Test NAPI file in linux_glibc containers
174
- if: matrix.image == 'linux_glibc'
175
- run: |
176
- ./tests/load-test.sh node:16-buster ${{matrix.cpu.platform}}
177
- ./tests/load-test.sh node:16-bullseye ${{matrix.cpu.platform}}
178
- ./tests/load-test.sh node:19-buster ${{matrix.cpu.platform}}
179
- ./tests/load-test.sh node:19-bullseye ${{matrix.cpu.platform}}
180
-
181
- - name: Test NAPI file in linux_musl containers
182
- if: matrix.image == 'linux_musl'
183
- run: |
184
- ./tests/load-test.sh node:18-alpine3.15 ${{matrix.cpu.platform}}
185
- ./tests/load-test.sh node:16-alpine3.15 ${{matrix.cpu.platform}}
186
-
187
- windows-napi:
188
- name: Build NAPI windows - Node ${{matrix.nodejs}} - ${{matrix.arch}}
189
- runs-on: windows-2022
190
- timeout-minutes: 3000
191
-
192
- strategy:
193
- fail-fast: false
194
- matrix:
195
- arch:
196
- - x64
197
- - x86
198
- nodejs:
199
- - 18
200
- python:
201
- - "3.10"
202
- steps:
203
- - uses: actions/checkout@v3
204
- - name: Use Node.js ${{ matrix.nodejs }}
205
- uses: actions/setup-node@v3
206
- with:
207
- node-version: ${{ matrix.nodejs }}
208
- architecture: ${{ matrix.arch }}
209
- cache: 'npm'
210
-
211
- - name: Use Python ${{ matrix.python }}
212
- uses: actions/setup-python@v3
213
- with:
214
- python-version: ${{ matrix.python }}
215
-
216
- - name: Cache CPP Client
217
- id: cache-dependencies
218
- uses: actions/cache@v3
219
- with:
220
- path: pkg/windows/
221
- key: ${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('pulsar-client-cpp.txt') }}
222
-
223
- - name: Add env vars
224
- shell: bash
225
- run: |
226
- if [ "${{ matrix.arch }}" = "x86" ]; then
227
- echo "TARGET=ia32" >> $GITHUB_ENV
228
- else
229
- echo "TARGET=${{ matrix.arch }}" >> $GITHUB_ENV
230
- fi
231
-
232
- - name: Download CPP Client
233
- if: steps.cache-dependencies.outputs.cache-hit != 'true'
234
- run: |
235
- pkg/windows/download-cpp-client.bat ${{ matrix.arch }}
236
-
237
- - name: Build Node binaries lib
238
- run: |
239
- npm install --ignore-scripts
240
- npx node-pre-gyp configure --target_arch=${{ env.TARGET }}
241
- npx node-pre-gyp build --target_arch=${{ env.TARGET }}
242
-
243
- - name: Test loading Node binaries lib
244
- run: |
245
- node pkg/load_test.js
246
-
247
- - name: Package Node binaries lib
248
- run: |
249
- npx node-pre-gyp package --target_arch=${{ env.TARGET }}
250
-
251
- macos-napi-homebrew:
252
- name: Build NAPI macos with CPP lib installed by Homebrew
253
- runs-on: macos-latest
254
- timeout-minutes: 3000
255
- strategy:
256
- fail-fast: false
257
- matrix:
258
- python:
259
- - "3.10"
260
-
261
- steps:
262
- - uses: actions/checkout@v3
263
- - name: Use Node.js 18
264
- uses: actions/setup-node@v3
265
- with:
266
- node-version: 18
267
- cache: 'npm'
268
- - name: Use Python ${{ matrix.python }}
269
- uses: actions/setup-python@v3
270
- with:
271
- python-version: ${{ matrix.python }}
272
- - name: Install CPP lib
273
- run: |
274
- export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=true
275
- brew update
276
- brew install libpulsar
277
- - name: Build Node binaries lib
278
- run: |
279
- npm install --ignore-scripts
280
- npx node-pre-gyp configure
281
- npx node-pre-gyp build
282
- - name: Test loading Node binaries lib
283
- run: |
284
- node pkg/load_test.js
285
- - name: Package Node binaries lib
286
- run: |
287
- npx node-pre-gyp package
288
-
289
- linux-napi-apt:
290
- name: Build NAPI linux with CPP lib installed by APT
291
- runs-on: ubuntu-22.04
292
- timeout-minutes: 3000
293
- strategy:
294
- fail-fast: false
295
- matrix:
296
- python:
297
- - "3.10"
298
-
299
- steps:
300
- - uses: actions/checkout@v3
301
- - name: Use Node.js 18
302
- uses: actions/setup-node@v3
303
- with:
304
- node-version: 18
305
- cache: 'npm'
306
-
307
- - name: Use Python ${{ matrix.python }}
308
- uses: actions/setup-python@v3
309
- with:
310
- python-version: ${{ matrix.python }}
311
-
312
- - name: Install CPP lib
313
- run: |
314
- source pulsar-client-cpp.txt
315
- UNAME_ARCH=$(uname -m)
316
- if [ $UNAME_ARCH == 'aarch64' ]; then
317
- PLATFORM='arm64'
318
- else
319
- PLATFORM='x86_64'
320
- fi
321
- curl -s -L -O ${CPP_CLIENT_BASE_URL}/deb-${PLATFORM}/apache-pulsar-client.deb
322
- curl -s -L -O ${CPP_CLIENT_BASE_URL}/deb-${PLATFORM}/apache-pulsar-client-dev.deb
323
- sudo -E apt -y install ./apache-pulsar-client.deb ./apache-pulsar-client-dev.deb
324
- - name: Build Node binaries lib
325
- run: |
326
- npm install --ignore-scripts
327
- npx node-pre-gyp configure
328
- npx node-pre-gyp build
329
- - name: Test loading Node binaries lib
330
- run: |
331
- node pkg/load_test.js
332
- - name: Package Node binaries lib
333
- run: |
334
- npx node-pre-gyp package
@@ -1,77 +0,0 @@
1
- #!/usr/bin/env python3
2
- #
3
- # Licensed to the Apache Software Foundation (ASF) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The ASF licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
- #
20
- import sys
21
- import requests
22
- import os
23
- import shutil
24
- import zipfile
25
- import tempfile
26
- from pathlib import Path
27
-
28
- if len(sys.argv) != 3:
29
- print("Usage: ")
30
- print(" %s $WORKFLOW_RUN_ID $DEST_PATH" % sys.argv[0])
31
- sys.exit(-1)
32
-
33
- if 'GITHUB_TOKEN' not in os.environ:
34
- print('You should have a GITHUB_TOKEN environment variable')
35
- sys.exit(-1)
36
-
37
- GITHUB_TOKEN = os.environ['GITHUB_TOKEN']
38
-
39
- ACCEPT_HEADER = 'application/vnd.github+json'
40
- LIST_URL = 'https://api.github.com/repos/apache/pulsar-client-node/actions/runs/%d/artifacts'
41
-
42
- workflow_run_id = int(sys.argv[1])
43
- dest_path = sys.argv[2]
44
-
45
- workflow_run_url = LIST_URL % workflow_run_id
46
- headers = {'Accept': ACCEPT_HEADER, 'Authorization': f'Bearer {GITHUB_TOKEN}'}
47
-
48
- response = requests.get(workflow_run_url, headers=headers)
49
- response.raise_for_status()
50
-
51
- data = response.json()
52
- for artifact in data['artifacts']:
53
- name = artifact['name']
54
- url = artifact['archive_download_url']
55
-
56
- print(f'Downloading {name} from {url}')
57
- artifact_response = requests.get(url, headers=headers, stream=True)
58
- artifact_response.raise_for_status()
59
-
60
- with tempfile.NamedTemporaryFile(delete=False) as tmp_zip:
61
- for chunk in artifact_response.iter_content(chunk_size=8192):
62
- tmp_zip.write(chunk)
63
- tmp_zip_path = tmp_zip.name
64
-
65
- try:
66
- dest_dir = os.path.join(dest_path, name)
67
- Path(dest_dir).mkdir(parents=True, exist_ok=True)
68
- with zipfile.ZipFile(tmp_zip_path, 'r') as z:
69
- z.extractall(dest_dir)
70
- finally:
71
- os.unlink(tmp_zip_path)
72
-
73
- for root, dirs, files in os.walk(dest_path, topdown=False):
74
- for name in files:
75
- shutil.move(os.path.join(root, name), dest_path)
76
- if not os.listdir(root):
77
- os.rmdir(root)
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Licensed to the Apache Software Foundation (ASF) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The ASF licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
- #
20
- ROOT_DIR=$(git rev-parse --show-toplevel)
21
-
22
- VERSION=$(npm version | grep pulsar-client | awk -F ':' '{print $2}' | sed "s?'??g" | sed "s?,??g" | sed "s? ??g")
23
-
24
- NAME=apache-pulsar-client-node-$VERSION
25
-
26
- OUT_DIR=${1:-.}
27
-
28
- git archive --format=tar.gz --prefix ${NAME}/ -o ${OUT_DIR}/${NAME}.tar.gz HEAD
@@ -1,43 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Licensed to the Apache Software Foundation (ASF) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The ASF licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
- #
20
-
21
- set -e -x
22
-
23
- export PULSAR_STANDALONE_CONF=test-conf/standalone.conf
24
- # There is an issue when starting the pulsar standalone with other metadata store: https://github.com/apache/pulsar/issues/17984
25
- # We need to use Zookeeper here. Otherwise the `Message Chunking` test will not pass.
26
- # We can remove this line after the pulsar release a new version contains this fix: https://github.com/apache/pulsar/pull/18126
27
- export PULSAR_STANDALONE_USE_ZOOKEEPER=1
28
- bin/pulsar-daemon start standalone \
29
- --no-functions-worker --no-stream-storage \
30
- --bookkeeper-dir data/bookkeeper
31
-
32
- echo "-- Wait for Pulsar service to be ready"
33
- for i in $(seq 30); do
34
- curl http://localhost:8080/metrics > /dev/null 2>&1 && break
35
- if [ $i -lt 30 ]; then
36
- sleep 1
37
- else
38
- echo '-- Pulsar standalone server startup timed out'
39
- exit 1
40
- fi
41
- done
42
-
43
- echo "-- Ready to start tests"
@@ -1,39 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Licensed to the Apache Software Foundation (ASF) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The ASF licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
- #
20
-
21
- set -e
22
-
23
- SRC_DIR=$(git rev-parse --show-toplevel)
24
- cd $SRC_DIR
25
-
26
- build-support/pulsar-test-service-stop.sh
27
-
28
- CONTAINER_ID=$(docker run -i -p 8080:8080 -p 6650:6650 -p 8443:8443 -p 6651:6651 --rm --detach apachepulsar/pulsar:latest sleep 3600)
29
-
30
- echo $CONTAINER_ID >.tests-container-id.txt
31
-
32
- docker cp $SRC_DIR/tests/conf $CONTAINER_ID:/pulsar/test-conf
33
- docker cp $SRC_DIR/tests/certificate/server.crt $CONTAINER_ID:/pulsar/test-conf
34
- docker cp $SRC_DIR/tests/certificate/server.key $CONTAINER_ID:/pulsar/test-conf
35
- docker cp $SRC_DIR/build-support/pulsar-test-container-start.sh $CONTAINER_ID:pulsar-test-container-start.sh
36
-
37
- docker exec -i $CONTAINER_ID /pulsar-test-container-start.sh
38
-
39
- echo "-- Ready to start tests"
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Licensed to the Apache Software Foundation (ASF) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The ASF licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
- #
20
-
21
- set -e
22
-
23
- SRC_DIR=$(git rev-parse --show-toplevel)
24
- cd $SRC_DIR
25
-
26
- CONTAINER_ID_PATH=".tests-container-id.txt"
27
-
28
- if [ -f ${CONTAINER_ID_PATH} ]; then
29
- CONTAINER_ID=$(cat $CONTAINER_ID_PATH)
30
- docker kill $CONTAINER_ID || true
31
- rm .tests-container-id.txt
32
- fi
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Licensed to the Apache Software Foundation (ASF) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The ASF licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
- #
20
-
21
- set -e
22
-
23
- FILES=$*
24
-
25
- for FILE in $FILES
26
- do
27
- echo "Signing $FILE"
28
- gpg --armor --output $FILE.asc --detach-sig $FILE
29
-
30
- # SHA-512 signature
31
- shasum -a 512 $FILE > $FILE.sha512
32
- done
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Licensed to the Apache Software Foundation (ASF) under one
4
- # or more contributor license agreements. See the NOTICE file
5
- # distributed with this work for additional information
6
- # regarding copyright ownership. The ASF licenses this file
7
- # to you under the Apache License, Version 2.0 (the
8
- # "License"); you may not use this file except in compliance
9
- # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing,
14
- # software distributed under the License is distributed on an
15
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
17
- # specific language governing permissions and limitations
18
- # under the License.
19
- #
20
-
21
- set -e -x
22
-
23
- if [ "$#" -ne 2 ]; then
24
- echo "Usage: $0 \$DEST_PATH \$WORKFLOW_ID"
25
- exit 1
26
- fi
27
-
28
- DEST_PATH=$(readlink -f $1)
29
- WORKFLOW_ID=$2
30
-
31
- pushd $(dirname "$0")
32
- PULSAR_NODE_PATH=$(git rev-parse --show-toplevel)
33
- popd
34
-
35
- mkdir -p $DEST_PATH
36
-
37
- cd $PULSAR_NODE_PATH
38
-
39
- build-support/download-release-artifacts.py $WORKFLOW_ID $DEST_PATH
40
- build-support/generate-source-archive.sh $DEST_PATH
41
-
42
- # Sign all files
43
- cd $DEST_PATH
44
- find . -type f | xargs $PULSAR_NODE_PATH/build-support/sign-files.sh