Skip to content

Commit dde74a0

Browse files
authored
Merge pull request #26884 from rockwotj/javascript
2 parents a889e32 + d47a214 commit dde74a0

File tree

11 files changed

+5382
-0
lines changed

11 files changed

+5382
-0
lines changed

tests/docker/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ ENV PATH="${PATH}:/usr/local/go/bin"
133133

134134
#################################
135135

136+
FROM base AS nodejs
137+
138+
COPY --chown=0:0 --chmod=0755 tests/docker/ducktape-deps/nodejs /
139+
RUN /nodejs && rm /nodejs
140+
ENV PATH="${PATH}:/opt/nodejs/bin"
141+
142+
#################################
143+
136144
FROM golang AS kaf
137145

138146
COPY --chown=0:0 --chmod=0755 tests/docker/ducktape-deps/kaf /
@@ -183,6 +191,15 @@ RUN --mount=type=cache,target=/root/go/pkg/mod,id=go-mod-cache \
183191

184192
#################################
185193

194+
FROM nodejs AS nodejs-test-clients
195+
196+
COPY --chown=0:0 --chmod=0755 tests/nodejs /opt/redpanda-tests/nodejs
197+
COPY --chown=0:0 --chmod=0755 tests/docker/ducktape-deps/nodejs-test-clients /
198+
RUN --mount=type=cache,target=/root/.npm,id=npm-cache \
199+
/nodejs-test-clients && rm /nodejs-test-clients
200+
201+
#################################
202+
186203
FROM golang AS franz-bench
187204

188205
COPY --chown=0:0 --chmod=0755 tests/docker/ducktape-deps/franz-bench /
@@ -439,6 +456,8 @@ COPY --from=iceberg-rest /opt/iceberg-rest-catalog /opt/iceberg-rest-catalog
439456
COPY --from=trino /opt/trino /opt/trino
440457
COPY --from=spark /opt/spark /opt/spark
441458
COPY --from=m2-collector /root/.m2 /root/.m2
459+
COPY --from=nodejs /opt/nodejs/ /opt/nodejs/
460+
COPY --from=nodejs-test-clients /opt/redpanda-tests/nodejs /opt/redpanda-tests/nodejs
442461

443462
RUN ldconfig
444463

tests/docker/Dockerfile.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
!tests/setup.py
66
!tests/python
77
!tests/go
8+
!tests/nodejs
89
!tools/offline_log_viewer
910
!tools/rp_storage_tool
1011
!tools/consumer_offsets_recovery

tests/docker/ducktape-deps/nodejs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
mkdir -p /opt/nodejs/
4+
if [ $(uname -m) = "aarch64" ]; then
5+
export ARCHID="arm64"
6+
else
7+
export ARCHID="x64"
8+
fi
9+
curl -sSLf --retry 3 --retry-connrefused --retry-delay 2 "https://nodejs.org/dist/v22.17.1/node-v22.17.1-linux-${ARCHID}.tar.xz" | tar -xJ -C /opt/nodejs/ --strip 1
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
cd /opt/redpanda-tests/nodejs/protobuf-serde
4+
NODE_ENV=production /opt/nodejs/bin/npm clean-install

tests/nodejs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

0 commit comments

Comments
 (0)