File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,10 +217,6 @@ build() {
217217
218218 DOCKERFILE=utils/build/docker/${TEST_LIBRARY} /${WEBLOG_VARIANT} .Dockerfile
219219
220- if [[ $TEST_LIBRARY == python_lambda ]]; then
221- ./utils/build/docker/python_lambda/build_lambda_layer.sh
222- fi
223-
224220 docker buildx build \
225221 --build-arg BUILDKIT_INLINE_CACHE=1 \
226222 --load \
Original file line number Diff line number Diff line change 11FROM public.ecr.aws/lambda/python:3.13
22
3- RUN dnf install -y unzip
3+ RUN dnf install -y unzip findutils
44
55# Add the Datadog Extension
66RUN mkdir -p /opt/extensions
77COPY --from=public.ecr.aws/datadog/lambda-extension:latest /opt/. /opt/
88
9- COPY binaries/ * /binaries/
10- RUN unzip /binaries/*.zip -d /opt
9+ COPY utils/build/docker/python_lambda/install_datadog_lambda.sh binaries * /binaries/
10+ RUN /binaries/install_datadog_lambda.sh
1111
1212# Setup the aws_lambda handler
1313COPY utils/build/docker/python_lambda/function/. ${LAMBDA_TASK_ROOT}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -eu
4+
5+ cd /binaries
6+
7+ if [ " $( find . -maxdepth 1 -name " *.zip" | wc -l) " = " 1" ]; then
8+ path=$( readlink -f " $( find . -maxdepth 1 -name " *.zip" ) " )
9+ echo " Install datadog_lambda from ${path} "
10+ unzip " ${path} " -d /opt
11+ else
12+ echo " Fetching from latest GitHub release"
13+ curl -fsSLO https://github.com/DataDog/datadog-lambda-python/releases/latest/download/datadog_lambda_py-amd64-3.13.zip
14+
15+ if [ ! -f datadog_lambda_py-amd64-3.13.zip ]; then
16+ echo " Failed to download datadog_lambda_py-amd64-3.13.zip"
17+ exit 1
18+ fi
19+ fi
Original file line number Diff line number Diff line change @@ -297,10 +297,16 @@ elif [ "$TARGET" = "waf_rule_set" ]; then
297297 -H " Accept: application/vnd.github.v3.raw" \
298298 https://api.github.com/repos/DataDog/appsec-event-rules/contents/build/recommended.json
299299elif [ " $TARGET " = " python_lambda" ]; then
300- assert_version_is_dev
301300 assert_target_branch_is_not_set
302301
303- get_github_action_artifact " DataDog/datadog-lambda-python" " build_layer.yml" " main" " datadog-lambda-python-3.13-amd64" " datadog_lambda_py-amd64-3.13.zip"
302+ if [ $VERSION = ' dev' ]; then
303+ get_github_action_artifact " DataDog/datadog-lambda-python" " build_layer.yml" " main" " datadog-lambda-python-3.13-amd64" " datadog_lambda_py-amd64-3.13.zip"
304+ elif [ $VERSION = ' prod' ]; then
305+ get_github_release_asset " DataDog/datadog-lambda-python" " datadog_lambda_py-amd64-3.13.zip"
306+ else
307+ echo " Don't know how to load version $VERSION for $TARGET "
308+ exit 1
309+ fi
304310
305311else
306312 echo " Unknown target: $1 "
You can’t perform that action at this time.
0 commit comments