Skip to content

Commit a8c0fe2

Browse files
committed
chore(lambda-layer-proxyagent): autobump mechanism
Add an autobump mechanism similar to the one in #18780.
1 parent 3d23eac commit a8c0fe2

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
set -eu
3+
scriptdir=$(cd $(dirname $0) && pwd)
4+
5+
package=proxy-agent
6+
7+
npm show $package version > $scriptdir/../proxyagent.version
8+
9+
echo "Proxy Agent is currently at $(cat $scriptdir/../proxyagent.version)"

Diff for: packages/@aws-cdk/lambda-layer-node-proxy-agent/layer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# base lambda image
22
FROM public.ecr.aws/lambda/nodejs:latest
33

4-
ARG PROXY_AGENT_VERSION=5.0.0
4+
ARG PROXY_AGENT_VERSION=0.0.0
55

66
USER root
77
RUN mkdir -p /opt

Diff for: packages/@aws-cdk/lambda-layer-node-proxy-agent/layer/build.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ set -euo pipefail
33

44
cd $(dirname $0)
55

6-
echo ">> Building AWS Lambda layer inside a docker image..."
6+
version=$(cat ../proxyagent.version)
7+
8+
echo ">> Building AWS Lambda layer inside a docker image for Proxy Agent ${version}..."
79

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

10-
docker build -t ${TAG} .
12+
docker build -t ${TAG} . --build-arg PROXY_AGENT_VERSION=${version}
1113

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

0 commit comments

Comments
 (0)