Skip to content

Commit 95dbbdf

Browse files
authored
feat: Added publishing for Node 22 layers (#297)
* chore: Updated Node agent version used in tests Signed-off-by: mrickard <[email protected]> * feat: Added Node 22 publishing Signed-off-by: mrickard <[email protected]> --------- Signed-off-by: mrickard <[email protected]>
1 parent d595501 commit 95dbbdf

File tree

7 files changed

+931
-376
lines changed

7 files changed

+931
-376
lines changed

.github/workflows/nodejs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
strategy:
3939
matrix:
40-
node-version: [18.x, 20.x]
40+
node-version: [18.x, 20.x, 22.x]
4141
steps:
4242
- uses: actions/checkout@v4
4343
- name: Use Node.js ${{ matrix.node-version }}
@@ -61,7 +61,7 @@ jobs:
6161

6262
strategy:
6363
matrix:
64-
node-version: [18.x, 20.x]
64+
node-version: [18.x, 20.x, 22.x]
6565

6666
steps:
6767
- uses: actions/checkout@v4

.github/workflows/publish-node.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
node-version: [18, 20]
13+
node-version: [18, 20, 22]
1414
steps:
1515
- uses: actions/checkout@v4
1616
- name: Use Node.js ${{ matrix.node-version }}.x

dockerfiles/Dockerfile.nodejs22x

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM node:22 as builder
2+
3+
RUN apt-get update \
4+
&& apt-get install -y curl unzip zip
5+
6+
RUN useradd -m newrelic-lambda-layers
7+
USER newrelic-lambda-layers
8+
WORKDIR /home/newrelic-lambda-layers
9+
10+
COPY --chown=newrelic-lambda-layers libBuild.sh .
11+
COPY --chown=newrelic-lambda-layers nodejs nodejs/
12+
13+
WORKDIR nodejs
14+
RUN ./publish-layers.sh build-nodejs22x
15+
16+
FROM python:3.8
17+
18+
RUN useradd -m newrelic-lambda-layers
19+
USER newrelic-lambda-layers
20+
WORKDIR /home/newrelic-lambda-layers
21+
RUN pip3 install -U awscli --user
22+
ENV PATH /home/newrelic-lambda-layers/.local/bin/:$PATH
23+
24+
COPY libBuild.sh .
25+
COPY nodejs nodejs/
26+
COPY --from=builder /home/newrelic-lambda-layers/nodejs/dist nodejs/dist
27+
28+
WORKDIR nodejs
29+
CMD ./publish-layers.sh publish-nodejs22x

libBuild.sh

+6
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ function layer_name_str() {
128128
"nodejs20.x")
129129
rt_part="NodeJS20X"
130130
;;
131+
"nodejs22.x")
132+
rt_part="NodeJS22X"
133+
;;
131134
"ruby3.2")
132135
rt_part="Ruby32"
133136
;;
@@ -188,6 +191,9 @@ function s3_prefix() {
188191
"nodejs20.x")
189192
name="nr-nodejs20.x"
190193
;;
194+
"nodejs22.x")
195+
name="nr-nodejs22.x"
196+
;;
191197
"ruby3.3")
192198
name="nr-ruby3.3"
193199
;;

0 commit comments

Comments
 (0)