1919case " $RUNTIME " in
2020 python)
2121 if [ " $ARCHITECTURE " == " amd64" ]; then
22- LAYER_NAME=Datadog-Python39-ARM
23- else
2422 LAYER_NAME=Datadog-Python39
23+ else
24+ LAYER_NAME=Datadog-Python39-ARM
2525 fi
2626 DOCKERFILE=Dockerfile.Python
2727 ;;
@@ -47,6 +47,7 @@ CURRENT_PATH=$(pwd)
4747# Build the extension
4848ARCHITECTURE=$ARCHITECTURE VERSION=1 ./scripts/build_binary_and_layer_dockerized.sh
4949
50+
5051# Move to the local_tests repo
5152cd ./local_tests
5253
@@ -55,7 +56,13 @@ cp ../.layers/datadog_extension-$ARCHITECTURE/extensions/datadog-agent .
5556
5657# Build the recorder extension which will act as a man-in-a-middle to intercept payloads sent to Datadog
5758cd ../../datadog-agent/test/integration/serverless/recorder-extension
58- GOOS=linux GOARCH=$ARCHITECTURE go build -o " $CURRENT_PATH /local_tests/recorder-extension" main.go
59+
60+ if [ ` uname -o` == " GNU/Linux" ]; then
61+ CGO_ENABLED=0 GOOS=linux GOARCH=$ARCHITECTURE go build -o " $CURRENT_PATH /local_tests/recorder-extension" main.go
62+ else
63+ GOOS=linux GOARCH=$ARCHITECTURE go build -o " $CURRENT_PATH /local_tests/recorder-extension" main.go
64+ fi
65+
5966cd " $CURRENT_PATH /local_tests"
6067if [ -z " $LAYER_PATH " ] && [ -n " $LAYER_NAME " ]; then
6168 # Get the latest available version
@@ -73,7 +80,7 @@ if [ -z "$LAYER_PATH" ] && [ -n "$LAYER_NAME" ]; then
7380 URL=$( aws-vault exec serverless-sandbox-account-admin \
7481 -- aws lambda get-layer-version --layer-name $LAYER_NAME --version-number $LATEST_AVAILABLE_VERSION \
7582 --query Content.Location --region sa-east-1 --output text)
76- curl $URL -o " $LAYER "
83+ curl -k $URL -o " $LAYER "
7784 rm -rf $CURRENT_PATH /local_tests/META_INF
7885 rm -rf $CURRENT_PATH /local_tests/python
7986 unzip " $LAYER "
0 commit comments