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

Commit 63b7d29

Browse files
committed
Hardcoded version replaced with latest tag, triggermesh/aws-custom-runtime#11
Signed-off-by: tzununbekov <t.zununbekov@gmail.com>
1 parent fe8063b commit 63b7d29

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

node-10.x/buildtemplate.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ spec:
4242
WORKDIR /opt
4343
4444
RUN apk --no-cache add curl \
45-
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/0.0.1/aws-custom-runtime > aws-custom-runtime \
46-
&& chmod +x aws-custom-runtime \
47-
&& curl -sL https://github.com/triggermesh/aws-lambda-runtime/archive/0.0.1.tar.gz | tar -xz aws-lambda-runtime-0.0.1/node-10.x \
48-
&& mv aws-lambda-runtime-0.0.1/node-10.x/* .
49-
45+
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
46+
&& RUNTIME_VERSION=$(curl -sI https://github.com/triggermesh/aws-lambda-runtime/releases/latest | grep "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
47+
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > aws-custom-runtime \
48+
&& chmod +x aws-custom-runtime \
49+
&& curl -sL https://github.com/triggermesh/aws-lambda-runtime/archive/${RUNTIME_VERSION}.tar.gz | tar -xz aws-lambda-runtime-${RUNTIME_VERSION}/node-10.x \
50+
&& mv aws-lambda-runtime-${RUNTIME_VERSION}/node-10.x/* .
5051
5152
ENV LAMBDA_TASK_ROOT "/opt"
5253
ENV _HANDLER "${HANDLER}"

python-2.7/buildtemplate.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ spec:
4242
WORKDIR /opt
4343
4444
RUN apk --no-cache add curl \
45-
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/0.0.1/aws-custom-runtime > aws-custom-runtime \
45+
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
46+
&& RUNTIME_VERSION=$(curl -sI https://github.com/triggermesh/aws-lambda-runtime/releases/latest | grep "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
47+
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > aws-custom-runtime \
4648
&& chmod +x aws-custom-runtime \
47-
&& curl -sL https://github.com/triggermesh/aws-lambda-runtime/archive/0.0.1.tar.gz | tar -xz aws-lambda-runtime-0.0.1/python-2.7 \
48-
&& mv aws-lambda-runtime-0.0.1/python-2.7/* .
49+
&& curl -sL https://github.com/triggermesh/aws-lambda-runtime/archive/${RUNTIME_VERSION}.tar.gz | tar -xz aws-lambda-runtime-${RUNTIME_VERSION}/python-2.7 \
50+
&& mv aws-lambda-runtime-${RUNTIME_VERSION}/python-2.7/* .
4951
5052
ENV LAMBDA_TASK_ROOT "/opt"
5153
ENV _HANDLER "${HANDLER}"

python-3.7/buildtemplate.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ spec:
4242
WORKDIR /opt
4343
4444
RUN apk --no-cache add curl \
45-
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/0.0.1/aws-custom-runtime > aws-custom-runtime \
45+
&& API_VERSION=$(curl -sI https://github.com/triggermesh/aws-custom-runtime/releases/latest | grep "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
46+
&& RUNTIME_VERSION=$(curl -sI https://github.com/triggermesh/aws-lambda-runtime/releases/latest | grep "Location:" | awk -F "/" '{print $NF}' | tr -d "\r") \
47+
&& curl -sL https://github.com/triggermesh/aws-custom-runtime/releases/download/${API_VERSION}/aws-custom-runtime > aws-custom-runtime \
4648
&& chmod +x aws-custom-runtime \
47-
&& curl -sL https://github.com/triggermesh/aws-lambda-runtime/archive/0.0.1.tar.gz | tar -xz aws-lambda-runtime-0.0.1/python-3.7 \
48-
&& mv aws-lambda-runtime-0.0.1/python-3.7/* .
49+
&& curl -sL https://github.com/triggermesh/aws-lambda-runtime/archive/${RUNTIME_VERSION}.tar.gz | tar -xz aws-lambda-runtime-${RUNTIME_VERSION}/python-3.7 \
50+
&& mv aws-lambda-runtime-${RUNTIME_VERSION}/python-3.7/* .
4951
5052
ENV LAMBDA_TASK_ROOT "/opt"
5153
ENV _HANDLER "${HANDLER}"

0 commit comments

Comments
 (0)