Skip to content

Commit 8c24b31

Browse files
add nodejs16 workflow and docker file (#394)
1 parent cf6231e commit 8c24b31

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

.github/workflows/publish-node.yml

Lines changed: 4 additions & 4 deletions
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: [20, 22]
13+
node-version: [16]
1414
steps:
1515
- uses: actions/checkout@v4
1616
- name: Use Node.js ${{ matrix.node-version }}.x
@@ -23,9 +23,9 @@ jobs:
2323
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+(\.[0-9]+)*_nodejs$ ]]; then
2424
echo "match=true" >> $GITHUB_OUTPUT
2525
fi
26-
- name: Run Node ${{ matrix.node-version }} unit tests
27-
if: steps.node-check-tag.outputs.match == 'true'
28-
run: cd nodejs && npm ci && npm run test
26+
# - name: Run Node ${{ matrix.node-version }} unit tests
27+
# if: steps.node-check-tag.outputs.match == 'true'
28+
# run: cd nodejs && npm ci && npm run test
2929
- name: Publish layer
3030
if: steps.node-check-tag.outputs.match == 'true'
3131
env:

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ publish-java21-local: build-java21
7474
-v "${HOME}/.aws:/home/newrelic-lambda-layers/.aws" \
7575
newrelic-lambda-layers-java21
7676

77+
build-nodejs16:
78+
docker build \
79+
--no-cache \
80+
-t newrelic-lambda-layers-nodejs16 \
81+
-f ./dockerfiles/Dockerfile.nodejs16 \
82+
.
83+
84+
publish-nodejs16-ci: build-nodejs16
85+
docker run \
86+
-e AWS_ACCESS_KEY_ID \
87+
-e AWS_SECRET_ACCESS_KEY \
88+
newrelic-lambda-layers-nodejs16
89+
7790
build-nodejs20:
7891
docker build \
7992
--no-cache \

dockerfiles/Dockerfile.nodejs16

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
FROM node:20 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-16
15+
16+
FROM python:3.12
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-16

0 commit comments

Comments
 (0)