Skip to content

Commit de06e49

Browse files
committed
Merge branch 'master' into dev_producer_testing_and_fixes
2 parents 11aa5e4 + af5b907 commit de06e49

File tree

10 files changed

+130
-8
lines changed

10 files changed

+130
-8
lines changed

.semaphore/project.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This file is managed by ServiceBot plugin - Semaphore. The content in this file is created using a common
2+
# template and configurations in service.yml.
3+
# Modifications in this file will be overwritten by generated content in the nightly run.
4+
# For more information, please refer to the page:
5+
# https://confluentinc.atlassian.net/wiki/spaces/Foundations/pages/2871296194/Add+SemaphoreCI
6+
apiVersion: v1alpha
7+
kind: Project
8+
metadata:
9+
name: confluent-kafka-js
10+
description: ""
11+
spec:
12+
visibility: private
13+
repository:
14+
url: [email protected]:confluentinc/confluent-kafka-js.git
15+
run_on:
16+
- branches
17+
- tags
18+
- pull_requests
19+
pipeline_file: .semaphore/semaphore.yml
20+
integration_type: github_app
21+
status:
22+
pipeline_files:
23+
- path: .semaphore/semaphore.yml
24+
level: pipeline
25+
whitelist:
26+
branches:
27+
- master
28+
- main
29+
- /^v\d+\.\d+\.x$/
30+
- /^gh-readonly-queue.*/
31+
custom_permissions: true
32+
debug_permissions:
33+
- empty
34+
- default_branch
35+
- non_default_branch
36+
- pull_request
37+
- forked_pull_request
38+
- tag
39+
attach_permissions:
40+
- default_branch
41+
- non_default_branch
42+
- pull_request
43+
- forked_pull_request
44+
- tag

.semaphore/semaphore.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This file is managed by ServiceBot plugin - Semaphore. The content in this file is created using a common
2+
# template and configurations in service.yml.
3+
# Any modifications made to version, name, agent, and global_job_config will be overwritten by the generated
4+
# content in nightly runs. Code changes made to the remaining sections will not be affected.
5+
# For more information, please refer to the page:
6+
# https://confluentinc.atlassian.net/wiki/spaces/Foundations/pages/2871296194/Add+SemaphoreCI
7+
version: v1.0
8+
name: build-test-release
9+
agent:
10+
machine:
11+
type: s1-prod-ubuntu20-04-amd64-1
12+
13+
auto_cancel:
14+
running:
15+
when: "branch != 'master'"
16+
17+
execution_time_limit:
18+
hours: 1
19+
20+
queue:
21+
- when: "branch != 'master'"
22+
processing: parallel
23+
24+
global_job_config:
25+
prologue:
26+
commands:
27+
- checkout
28+
- make show-args
29+
- . vault-setup
30+
- . vault-sem-get-secret cpd_gcloud
31+
- . vault-sem-get-secret ci-reporting
32+
- . vault-sem-get-secret v1/ci/kv/service-foundations/cc-mk-include
33+
- make init-ci
34+
epilogue:
35+
always:
36+
commands:
37+
- make epilogue-ci
38+
39+
blocks:
40+
- name: "Build, Test, Release"
41+
run:
42+
# don't run the build or unit tests on non-functional changes...
43+
when: "change_in('/', {exclude: ['/.deployed-versions/', '.github/']})"
44+
task:
45+
# You can customize your CI job here
46+
# env_vars:
47+
# # custom env_vars
48+
# prologue:
49+
# commands:
50+
# # custom vault secrets
51+
# # custom prologue commands
52+
jobs:
53+
- name: "Build, Test, Release"
54+
commands:
55+
- make build
56+
- make test
57+
- make release-ci
58+
epilogue:
59+
always:
60+
commands:
61+
- make epilogue-ci
62+
- make testbreak-after

binding.gyp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
# may be redefined in command line on configuration stage
44
# "BUILD_LIBRDKAFKA%": "<!(echo ${BUILD_LIBRDKAFKA:-1})"
55
"BUILD_LIBRDKAFKA%": "<!(node ./util/get-env.js BUILD_LIBRDKAFKA 1)",
6+
"CKJS_LINKING%": "<!(node ./util/get-env.js CKJS_LINKING static)",
67
},
78
"targets": [
89
{
9-
"target_name": "node-librdkafka",
10+
"target_name": "confluent-kafka-js",
1011
'sources': [
1112
'src/binding.cc',
1213
'src/callbacks.cc',
@@ -85,7 +86,17 @@
8586
],
8687
'conditions': [
8788
[
88-
'OS=="linux"',
89+
['OS=="linux"', 'CKJS_LINKING="dynamic"'],
90+
{
91+
"libraries": [
92+
"../build/deps/librdkafka.so",
93+
"../build/deps/librdkafka++.so",
94+
"-Wl,-rpath='$$ORIGIN/../deps'",
95+
],
96+
}
97+
],
98+
[
99+
['OS=="linux"', 'CKJS_LINKING!="dynamic"'],
89100
{
90101
"libraries": [
91102
"../build/deps/librdkafka-static.a",

deps/librdkafka.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"librdkafka/config.h",
2727
],
2828
"action": [
29-
"make", "-C", "librdkafka", "libs", "install"
29+
"make", "-j5", "-C", "librdkafka", "libs", "install"
3030
],
3131
"conditions": [
3232
[

librdkafka.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
* of the MIT license. See the LICENSE.txt file for details.
88
*/
99

10-
var kafka = require('bindings')('node-librdkafka');
10+
var kafka = require('bindings')('confluent-kafka-js');
1111

1212
module.exports = kafka;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test:types": "tsc -p ."
1515
},
1616
"binary": {
17-
"module_name": "node-librdkafka",
17+
"module_name": "confluent-kafka-js",
1818
"module_path": "./build/{configuration}/",
1919
"package_name": "{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz",
2020
"host": "https://github.com/confluentinc/confluent-kafka-js/releases/download/",

service.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ github:
77
enable: true
88
codeowners:
99
enable: true
10+
semaphore:
11+
enable: true

test/binding.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* of the MIT license. See the LICENSE.txt file for details.
88
*/
99

10-
var addon = require('bindings')('node-librdkafka');
10+
var addon = require('bindings')('confluent-kafka-js');
1111
var t = require('assert');
1212

1313
var consumerConfig = {

test/consumer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* of the MIT license. See the LICENSE.txt file for details.
88
*/
99

10-
var addon = require('bindings')('node-librdkafka');
10+
var addon = require('bindings')('confluent-kafka-js');
1111
var t = require('assert');
1212

1313
var client;

util/configure.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ if (isWin) {
1919
var childProcess = require('child_process');
2020

2121
try {
22-
childProcess.execSync('./configure --install-deps --source-deps-only --disable-lz4-ext --enable-static --enable-strip --disable-gssapi --prefix=' + releaseDir + ' --libdir=' + releaseDir, {
22+
let opts = '--install-deps --source-deps-only --disable-lz4-ext --enable-static --enable-strip --disable-gssapi';
23+
if (process.env['CKJS_LINKING'] === 'dynamic')
24+
opts = '';
25+
childProcess.execSync(`./configure ${opts} --prefix=${releaseDir} --libdir=${releaseDir}`, {
2326
cwd: baseDir,
2427
stdio: [0,1,2]
2528
});

0 commit comments

Comments
 (0)