Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit 7f97c6b

Browse files
authored
Merge pull request #81 from triggermesh/runtimes-update
Update Python, NodeJS and Ruby to the latest AWS Lambda versions
2 parents ec0bfa4 + 279c4de commit 7f97c6b

File tree

8 files changed

+75
-2
lines changed

8 files changed

+75
-2
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ jobs:
2121
matrix:
2222
include:
2323
- runtime: java8
24-
- runtime: node10
2524
- runtime: node4
25+
- runtime: node10
26+
- runtime: node18
2627
- runtime: python27
2728
- runtime: python37
29+
- runtime: python310
2830
- runtime: ruby25
31+
- runtime: ruby32
2932

3033
steps:
3134
- name: Checkout

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
REPO = knative-lambda-runtime
22
REPO_DESC = TriggerMesh Knative Lambda Runtime
3-
RUNTIMES = java8 node10 node4 python27 python37 ruby25
3+
RUNTIMES = java8 node10 node4 node18 python27 python37 python310 ruby25 ruby32
44

55
BASE_DIR ?= $(CURDIR)
66

node18/.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Dockerfile
2+
.dockerignore
3+
4+
**/*.md
5+
**/.gitignore

node18/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM alpine as downloader
2+
3+
RUN apk --no-cache add curl \
4+
&& DOWNLOAD_URL=$(curl -sSf https://api.github.com/repos/triggermesh/aws-custom-runtime/releases/latest | grep "browser_download_url.*-linux-amd64" | cut -d: -f 2,3 | tr -d \") \
5+
&& curl -sSfL ${DOWNLOAD_URL} -o /opt/aws-custom-runtime \
6+
&& chmod +x /opt/aws-custom-runtime
7+
8+
FROM amazon/aws-lambda-nodejs:18
9+
10+
WORKDIR /opt
11+
12+
RUN mv /var/runtime/bootstrap /opt
13+
14+
COPY --from=downloader /opt/aws-custom-runtime /opt/
15+
16+
ENV LAMBDA_TASK_ROOT "/opt"

python310/.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Dockerfile
2+
.dockerignore
3+
4+
**/*.md
5+
**/.gitignore

python310/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM alpine as downloader
2+
3+
RUN apk --no-cache add curl git \
4+
&& DOWNLOAD_URL=$(curl -sSf https://api.github.com/repos/triggermesh/aws-custom-runtime/releases/latest | grep "browser_download_url.*-linux-amd64" | cut -d: -f 2,3 | tr -d \") \
5+
&& curl -sSfL ${DOWNLOAD_URL} -o /opt/aws-custom-runtime \
6+
&& chmod +x /opt/aws-custom-runtime \
7+
&& git clone https://github.com/triggermesh/eventstore-python-client.git /opt/client
8+
9+
FROM amazon/aws-lambda-python:3.10
10+
11+
WORKDIR /opt
12+
13+
RUN pip install --upgrade pip \
14+
&& pip install grpcio grpcio-tools
15+
16+
RUN mv /var/runtime/bootstrap /opt
17+
18+
COPY --from=downloader /opt/client/eventstore /opt/eventstore
19+
COPY --from=downloader /opt/aws-custom-runtime /opt/
20+
21+
ENV PYTHONPATH "/opt/eventstore"
22+
ENV LAMBDA_TASK_ROOT "/opt"

ruby32/.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Dockerfile
2+
.dockerignore
3+
4+
**/*.md
5+
**/.gitignore

ruby32/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM alpine as downloader
2+
3+
RUN apk --no-cache add curl \
4+
&& DOWNLOAD_URL=$(curl -sSf https://api.github.com/repos/triggermesh/aws-custom-runtime/releases/latest | grep "browser_download_url.*-linux-amd64" | cut -d: -f 2,3 | tr -d \") \
5+
&& curl -sSfL ${DOWNLOAD_URL} -o /opt/aws-custom-runtime \
6+
&& chmod +x /opt/aws-custom-runtime
7+
8+
FROM amazon/aws-lambda-ruby:3.2
9+
10+
WORKDIR /opt
11+
12+
RUN mv /var/runtime/bootstrap /opt
13+
14+
COPY --from=downloader /opt/aws-custom-runtime /opt/
15+
16+
ENV RUBYLIB "/opt"
17+
ENV LAMBDA_TASK_ROOT "/opt"

0 commit comments

Comments
 (0)