pulsar-client 1.6.2 → 1.8.0-rc1

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 (74) hide show
  1. package/.asf.yaml +8 -1
  2. package/.github/PULL_REQUEST_TEMPLATE.md +65 -0
  3. package/.github/workflows/ci-build-release-napi.yml +195 -0
  4. package/.github/workflows/ci-pr-validation.yml +225 -0
  5. package/README.md +87 -68
  6. package/binding.gyp +41 -39
  7. package/{pulsar-test-service-stop.sh → build-support/dep-version.py} +4 -6
  8. package/build-support/download-release-artifacts.py +74 -0
  9. package/build-support/generate-source-archive.sh +28 -0
  10. package/build-support/install-cpp-client.sh +66 -0
  11. package/{pulsar-test-service-start.sh → build-support/pulsar-test-container-start.sh} +11 -21
  12. package/build-support/pulsar-test-service-start.sh +37 -0
  13. package/build-support/pulsar-test-service-stop.sh +32 -0
  14. package/{.github/workflows/nodejs.yml → build-support/sign-files.sh} +13 -12
  15. package/build-support/stage-release.sh +44 -0
  16. package/dependencies.yaml +28 -0
  17. package/docs/release-process.md +242 -0
  18. package/examples/consumer.js +1 -1
  19. package/examples/consumer_listener.js +1 -1
  20. package/examples/consumer_tls_auth.js +1 -1
  21. package/examples/custom_logger.js +60 -0
  22. package/examples/encryption-consumer.js +1 -1
  23. package/examples/encryption-producer.js +1 -1
  24. package/examples/producer.js +1 -1
  25. package/examples/producer_tls_auth.js +1 -1
  26. package/examples/reader.js +1 -1
  27. package/examples/reader_listener.js +1 -1
  28. package/index.d.ts +12 -4
  29. package/index.js +2 -1
  30. package/package.json +14 -12
  31. package/pkg/build-napi-inside-docker.sh +31 -0
  32. package/pkg/linux_glibc/Dockerfile +33 -0
  33. package/pkg/linux_musl/Dockerfile +32 -0
  34. package/pkg/load_test.js +30 -0
  35. package/pkg/mac/build-cpp-deps-lib.sh +186 -0
  36. package/pkg/mac/build-cpp-lib.sh +51 -0
  37. package/{docker-tests.sh → pkg/mac/common.sh} +13 -13
  38. package/pkg/windows/download-cpp-client.bat +12 -0
  39. package/pulsar-client-cpp.txt +2 -0
  40. package/src/AuthenticationAthenz.js +1 -1
  41. package/src/AuthenticationOauth2.js +1 -1
  42. package/src/AuthenticationTls.js +1 -1
  43. package/src/AuthenticationToken.js +1 -1
  44. package/src/Client.cc +84 -58
  45. package/src/Client.h +6 -4
  46. package/src/Consumer.cc +331 -234
  47. package/src/Consumer.h +11 -9
  48. package/src/ConsumerConfig.cc +54 -32
  49. package/src/ConsumerConfig.h +5 -6
  50. package/src/Message.cc +26 -29
  51. package/src/Message.h +4 -4
  52. package/src/MessageId.cc +19 -22
  53. package/src/MessageId.h +5 -6
  54. package/src/MessageListener.h +3 -8
  55. package/src/Producer.cc +116 -133
  56. package/src/Producer.h +3 -3
  57. package/src/ProducerConfig.cc +39 -22
  58. package/src/ProducerConfig.h +2 -2
  59. package/src/Reader.cc +147 -128
  60. package/src/Reader.h +5 -3
  61. package/src/ReaderConfig.cc +14 -20
  62. package/src/ReaderConfig.h +5 -6
  63. package/src/ReaderListener.h +2 -7
  64. package/src/SchemaInfo.cc +78 -0
  65. package/src/SchemaInfo.h +41 -0
  66. package/src/ThreadSafeDeferred.cc +98 -0
  67. package/src/ThreadSafeDeferred.h +85 -0
  68. package/src/pulsar-binding.js +8 -0
  69. package/tests/conf/standalone.conf +6 -0
  70. package/tests/consumer.test.js +2 -2
  71. package/tests/end_to_end.test.js +214 -2
  72. package/tests/producer.test.js +2 -2
  73. package/{run-unit-tests.sh → tests/run-unit-tests.sh} +5 -14
  74. package/pulsar-version.txt +0 -1
package/binding.gyp CHANGED
@@ -18,19 +18,6 @@
18
18
  #
19
19
 
20
20
  {
21
- 'conditions': [
22
- ['OS=="win"', {
23
- 'variables': {
24
- 'pulsar_cpp_dir%': '<!(echo %PULSAR_CPP_DIR%)',
25
- 'os_arch%': '<!(echo %OS_ARCH%)',
26
- },
27
- }],
28
- ['OS=="mac"', {
29
- 'variables': {
30
- 'pulsar_cpp_dir': '<!(echo $PULSAR_CPP_DIR)'
31
- }
32
- }]
33
- ],
34
21
  "targets": [
35
22
  {
36
23
  "target_name": "Pulsar",
@@ -40,64 +27,79 @@
40
27
  "include_dirs": [
41
28
  "<!@(node -p \"require('node-addon-api').include\")",
42
29
  ],
43
- "defines": ["NAPI_VERSION=4", "NAPI_DISABLE_CPP_EXCEPTIONS=1"],
30
+ "defines": ["NAPI_VERSION=4"],
44
31
  "sources": [
45
32
  "src/addon.cc",
46
33
  "src/Message.cc",
47
34
  "src/MessageId.cc",
48
35
  "src/Authentication.cc",
49
36
  "src/Client.cc",
37
+ "src/SchemaInfo.cc",
50
38
  "src/Producer.cc",
51
39
  "src/ProducerConfig.cc",
52
40
  "src/Consumer.cc",
53
41
  "src/ConsumerConfig.cc",
54
42
  "src/Reader.cc",
55
43
  "src/ReaderConfig.cc",
44
+ "src/ThreadSafeDeferred.cc"
56
45
  ],
57
46
  'conditions': [
58
47
  ['OS=="mac"', {
59
- "include_dirs": [
60
- "<(pulsar_cpp_dir)/include",
48
+ 'xcode_settings': {
49
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
50
+ 'GCC_ENABLE_CPP_RTTI': 'YES',
51
+ 'MACOSX_DEPLOYMENT_TARGET': '11.0',
52
+ 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11',
53
+ 'OTHER_CFLAGS': [
54
+ "-fPIC",
55
+ ]
56
+ },
57
+ "dependencies": [
58
+ "<!@(node -p \"require('node-addon-api').gyp\")"
61
59
  ],
62
- "libraries": [
63
- "<(pulsar_cpp_dir)/lib/libpulsar.dylib"
60
+ "include_dirs": [
61
+ "pkg/mac/build-pulsar/install/include"
64
62
  ],
65
63
  }],
66
64
  ['OS=="win"', {
65
+ "defines": [
66
+ "_HAS_EXCEPTIONS=1",
67
+ "PULSAR_STATIC"
68
+ ],
69
+ "msvs_settings": {
70
+ "VCCLCompilerTool": {
71
+ "ExceptionHandling": 1
72
+ },
73
+ },
67
74
  "include_dirs": [
68
- "<(pulsar_cpp_dir)\include",
75
+ "pkg\\windows\\pulsar-cpp\\include",
69
76
  ],
70
77
  "libraries": [
71
- "-l<(pulsar_cpp_dir)\\lib\Release\pulsar.lib"
78
+ "..\\pkg\\windows\\pulsar-cpp\\lib\\pulsarWithDeps.lib"
72
79
  ],
73
80
  "dependencies": [
74
81
  "<!(node -p \"require('node-addon-api').gyp\")"
75
- ],
76
- "copies": [
77
- {
78
- "destination": "<(PRODUCT_DIR)",
79
- "files": [
80
- "<(pulsar_cpp_dir)\\lib\Release\pulsar.dll",
81
- "<(pulsar_cpp_dir)\\vcpkg_installed\\<(os_arch)\\bin\libcurl.dll",
82
- "<(pulsar_cpp_dir)\\vcpkg_installed\\<(os_arch)\\bin\libprotobuf.dll",
83
- "<(pulsar_cpp_dir)\\vcpkg_installed\\<(os_arch)\\bin\libssl-1_1-x64.dll",
84
- "<(pulsar_cpp_dir)\\vcpkg_installed\\<(os_arch)\\bin\libcrypto-1_1-x64.dll",
85
- "<(pulsar_cpp_dir)\\vcpkg_installed\\<(os_arch)\\bin\dl.dll",
86
- "<(pulsar_cpp_dir)\\vcpkg_installed\\<(os_arch)\\bin\snappy.dll",
87
- "<(pulsar_cpp_dir)\\vcpkg_installed\\<(os_arch)\\bin\zlib1.dll",
88
- "<(pulsar_cpp_dir)\\vcpkg_installed\\<(os_arch)\\bin\zstd.dll",
89
- ]
90
- }
91
82
  ]
92
83
  }, { # 'OS!="win"'
93
- "libraries": [
94
- "-lpulsar",
95
- ],
96
84
  "dependencies": [
97
85
  "<!@(node -p \"require('node-addon-api').gyp\")"
98
86
  ],
87
+ "libraries": [
88
+ "../pkg/lib/libpulsarwithdeps.a"
89
+ ],
99
90
  }]
100
91
  ]
92
+ },
93
+ {
94
+ "target_name": "action_after_build",
95
+ "type": "none",
96
+ "dependencies": [ "<(module_name)" ],
97
+ "copies": [
98
+ {
99
+ "files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
100
+ "destination": "<(module_path)"
101
+ }
102
+ ]
101
103
  }
102
104
  ]
103
105
  }
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env python3
2
2
  #
3
3
  # Licensed to the Apache Software Foundation (ASF) under one
4
4
  # or more contributor license agreements. See the NOTICE file
@@ -18,9 +18,7 @@
18
18
  # under the License.
19
19
  #
20
20
 
21
- set -e
21
+ import yaml, sys
22
22
 
23
- PULSAR_DIR="${PULSAR_DIR:-/tmp/pulsar-test-dist}"
24
- cd $PULSAR_DIR
25
-
26
- bin/pulsar-daemon stop standalone
23
+ deps = yaml.safe_load(open("dependencies.yaml"))
24
+ print(deps[sys.argv[1]])
@@ -0,0 +1,74 @@
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
+
21
+ import sys, json, urllib.request, os, shutil, zipfile, tempfile
22
+ from pathlib import Path
23
+
24
+ if len(sys.argv) != 3:
25
+ print("Usage: ")
26
+ print(" %s $WORKFLOW_RUN_ID $DEST_PATH" % sys.argv[0])
27
+ sys.exit(-1)
28
+
29
+ if 'GITHUB_TOKEN' not in os.environ:
30
+ print('You should have a GITHUB_TOKEN environment variable')
31
+ sys.exit(-1)
32
+
33
+ GITHUB_TOKEN = os.environ['GITHUB_TOKEN']
34
+
35
+ ACCEPT_HEADER = 'application/vnd.github+json'
36
+ LIST_URL = 'https://api.github.com/repos/apache/pulsar-client-node/actions/runs/%d/artifacts'
37
+
38
+ workflow_run_id = int(sys.argv[1])
39
+ dest_path = sys.argv[2]
40
+
41
+ workflow_run_url = LIST_URL % workflow_run_id
42
+ request = urllib.request.Request(workflow_run_url,
43
+ headers={'Accept': ACCEPT_HEADER, 'Authorization': 'Bearer ' + GITHUB_TOKEN})
44
+ with urllib.request.urlopen(request) as response:
45
+ data = json.loads(response.read().decode("utf-8"))
46
+ for artifact in data['artifacts']:
47
+ name = artifact['name']
48
+ url = artifact['archive_download_url']
49
+
50
+ print('Downloading %s from %s' % (name, url))
51
+ artifact_request = urllib.request.Request(url,
52
+ headers={'Authorization': 'Bearer ' + GITHUB_TOKEN})
53
+ with urllib.request.urlopen(artifact_request) as response:
54
+ tmp_zip = tempfile.NamedTemporaryFile(delete=False)
55
+ try:
56
+ #
57
+ shutil.copyfileobj(response, tmp_zip)
58
+ tmp_zip.close()
59
+
60
+ dest_dir = os.path.join(dest_path, name)
61
+ Path(dest_dir).mkdir(parents=True, exist_ok=True)
62
+ with zipfile.ZipFile(tmp_zip.name, 'r') as z:
63
+ z.extractall(dest_dir)
64
+ finally:
65
+ os.unlink(tmp_zip.name)
66
+
67
+ for root, dirs, files in os.walk(dest_path, topdown=False):
68
+ for name in files:
69
+ shutil.move(os.path.join(root, name), dest_path)
70
+ if not os.listdir(root):
71
+ os.rmdir(root)
72
+
73
+
74
+
@@ -0,0 +1,28 @@
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
@@ -0,0 +1,66 @@
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
+ ROOT_DIR=`cd $(dirname $0) && cd .. && pwd`
24
+ source $ROOT_DIR/pulsar-client-cpp.txt
25
+
26
+ if [ $USER != "root" ]; then
27
+ SUDO="sudo"
28
+ fi
29
+
30
+ # Get the flavor of Linux
31
+ export $(cat /etc/*-release | grep "^ID=")
32
+
33
+ cd /tmp
34
+
35
+ UNAME_ARCH=$(uname -m)
36
+ if [ $UNAME_ARCH == 'aarch64' ]; then
37
+ PLATFORM=arm64
38
+ else
39
+ PLATFORM=x86_64
40
+ fi
41
+
42
+ if [ $ID == 'ubuntu' -o $ID == 'debian' ]; then
43
+ curl -L -O ${CPP_CLIENT_BASE_URL}/deb-${PLATFORM}/apache-pulsar-client.deb
44
+ curl -L -O ${CPP_CLIENT_BASE_URL}/deb-${PLATFORM}/apache-pulsar-client-dev.deb
45
+ $SUDO apt install -y /tmp/*.deb
46
+
47
+ elif [ $ID == 'alpine' ]; then
48
+ curl -L -O ${CPP_CLIENT_BASE_URL}/apk-${PLATFORM}/${UNAME_ARCH}/apache-pulsar-client-${CPP_CLIENT_VERSION}-r0.apk
49
+ curl -L -O ${CPP_CLIENT_BASE_URL}/apk-${PLATFORM}/${UNAME_ARCH}/apache-pulsar-client-dev-${CPP_CLIENT_VERSION}-r0.apk
50
+ $SUDO apk add --allow-untrusted /tmp/*.apk
51
+
52
+ elif [ $ID == '"centos"' ]; then
53
+ curl -L -O ${CPP_CLIENT_BASE_URL}/rpm-${PLATFORM}/${UNAME_ARCH}/apache-pulsar-client-${CPP_CLIENT_VERSION}-1.${UNAME_ARCH}.rpm
54
+ curl -L -O ${CPP_CLIENT_BASE_URL}/rpm-${PLATFORM}/${UNAME_ARCH}/apache-pulsar-client-devel-${CPP_CLIENT_VERSION}-1.${UNAME_ARCH}.rpm
55
+ $SUDO rpm -i /tmp/*.rpm
56
+
57
+ else
58
+ echo "Unknown Linux distribution: '$ID'"
59
+ exit 1
60
+ fi
61
+
62
+ mkdir -p $ROOT_DIR/pkg/lib/
63
+ cp /usr/lib/libpulsarwithdeps.a $ROOT_DIR/pkg/lib/
64
+
65
+
66
+
@@ -1,4 +1,4 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env bash
2
2
  #
3
3
  # Licensed to the Apache Software Foundation (ASF) under one
4
4
  # or more contributor license agreements. See the NOTICE file
@@ -18,28 +18,18 @@
18
18
  # under the License.
19
19
  #
20
20
 
21
- set -e
21
+ set -e -x
22
22
 
23
- ROOT_DIR=$(git rev-parse --show-toplevel)
24
- cd $ROOT_DIR
25
-
26
- VERSION="${VERSION:-`cat ./pulsar-version.txt`}"
27
- PULSAR_DIR="${PULSAR_DIR:-/tmp/pulsar-test-dist}"
28
- PKG=apache-pulsar-${VERSION}-bin.tar.gz
29
-
30
- rm -rf $PULSAR_DIR
31
- curl -L --create-dir "https://archive.apache.org/dist/pulsar/pulsar-${VERSION}/${PKG}" -o $PULSAR_DIR/$PKG
32
- tar xfz $PULSAR_DIR/$PKG -C $PULSAR_DIR --strip-components 1
33
-
34
- DATA_DIR=/tmp/pulsar-test-data
35
- rm -rf $DATA_DIR
36
- mkdir -p $DATA_DIR
37
-
38
- export PULSAR_STANDALONE_CONF=$ROOT_DIR/tests/conf/standalone.conf
39
- $PULSAR_DIR/bin/pulsar-daemon start standalone \
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 \
40
29
  --no-functions-worker --no-stream-storage \
41
- --zookeeper-dir $DATA_DIR/zookeeper \
42
- --bookkeeper-dir $DATA_DIR/bookkeeper
30
+ --bookkeeper-dir data/bookkeeper
43
31
 
44
32
  echo "-- Wait for Pulsar service to be ready"
45
33
  until curl http://localhost:8080/metrics > /dev/null 2>&1 ; do sleep 1; done
34
+
35
+ echo "-- Ready to start tests"
@@ -0,0 +1,37 @@
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:2.10.2 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/build-support/pulsar-test-container-start.sh $CONTAINER_ID:pulsar-test-container-start.sh
34
+
35
+ docker exec -i $CONTAINER_ID /pulsar-test-container-start.sh
36
+
37
+ echo "-- Ready to start tests"
@@ -0,0 +1,32 @@
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,3 +1,4 @@
1
+ #!/usr/bin/env bash
1
2
  #
2
3
  # Licensed to the Apache Software Foundation (ASF) under one
3
4
  # or more contributor license agreements. See the NOTICE file
@@ -16,16 +17,16 @@
16
17
  # specific language governing permissions and limitations
17
18
  # under the License.
18
19
  #
19
- name: Node.js
20
- on: [pull_request]
21
- jobs:
22
- build:
23
- name: Build
24
- runs-on: ubuntu-latest
25
- steps:
26
- - name: Check out code into the Node.js module directory
27
- uses: actions/checkout@v2
28
20
 
29
- - name: Test
30
- run: |
31
- ./docker-tests.sh
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
@@ -0,0 +1,44 @@
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 [ $# -neq 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
@@ -0,0 +1,28 @@
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
+
20
+ # Only used for MacOS builds
21
+ boost: 1.80.0
22
+ cmake: 3.24.2
23
+ protobuf: 3.20.0
24
+ zlib: 1.2.13
25
+ zstd: 1.5.2
26
+ snappy: 1.1.9
27
+ openssl: 1.1.1s
28
+ curl: 7.85.0