Skip to content

Commit

Permalink
chore(lambda-layer-proxyagent): autobump mechanism
Browse files Browse the repository at this point in the history
Add an autobump mechanism similar to the one in
#18780.
  • Loading branch information
rix0rrr committed Feb 2, 2022
1 parent 3d23eac commit a8c0fe2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -eu
scriptdir=$(cd $(dirname $0) && pwd)

package=proxy-agent

npm show $package version > $scriptdir/../proxyagent.version

echo "Proxy Agent is currently at $(cat $scriptdir/../proxyagent.version)"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# base lambda image
FROM public.ecr.aws/lambda/nodejs:latest

ARG PROXY_AGENT_VERSION=5.0.0
ARG PROXY_AGENT_VERSION=0.0.0

USER root
RUN mkdir -p /opt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ set -euo pipefail

cd $(dirname $0)

echo ">> Building AWS Lambda layer inside a docker image..."
version=$(cat ../proxyagent.version)

echo ">> Building AWS Lambda layer inside a docker image for Proxy Agent ${version}..."

TAG='aws-lambda-node-proxy-agent'

docker build -t ${TAG} .
docker build -t ${TAG} . --build-arg PROXY_AGENT_VERSION=${version}

echo ">> Extrating layer.zip from the build container..."
CONTAINER=$(docker run -d ${TAG} false)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.0.0

0 comments on commit a8c0fe2

Please sign in to comment.