diff --git a/tests/integration/codebuild/buildspec.os.alpine.yml b/tests/integration/codebuild/buildspec.os.alpine.yml index 8d13f9e..49702db 100644 --- a/tests/integration/codebuild/buildspec.os.alpine.yml +++ b/tests/integration/codebuild/buildspec.os.alpine.yml @@ -15,9 +15,8 @@ batch: env: variables: DISTRO_VERSION: - - "3.13" - - "3.14" - - "3.15" + - "3.19" + - "3.20" RUNTIME_VERSION: - "3.8" - "3.9" @@ -71,6 +70,7 @@ phases: - set -x - echo "Running Image ${IMAGE_TAG}" - docker network create "${TEST_NAME}-network" + - PYTHON_LOCATION=${PYTHON_LOCATION}${RUNTIME_VERSION} - > docker run \ --detach \ diff --git a/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml b/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml index 38f2509..08cac29 100644 --- a/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml +++ b/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml @@ -17,7 +17,6 @@ batch: DISTRO_VERSION: - "2" RUNTIME_VERSION: - - "3.7" - "3.8" - "3.9" - "3.10" diff --git a/tests/integration/codebuild/buildspec.os.amazonlinux.1.yml b/tests/integration/codebuild/buildspec.os.amazonlinux.23.yml similarity index 75% rename from tests/integration/codebuild/buildspec.os.amazonlinux.1.yml rename to tests/integration/codebuild/buildspec.os.amazonlinux.23.yml index 91bb021..a5f24dc 100644 --- a/tests/integration/codebuild/buildspec.os.amazonlinux.1.yml +++ b/tests/integration/codebuild/buildspec.os.amazonlinux.23.yml @@ -15,9 +15,8 @@ batch: env: variables: DISTRO_VERSION: - - "1" + - "2023" RUNTIME_VERSION: - - "3.7" - "3.8" - "3.9" - "3.10" @@ -31,12 +30,21 @@ phases: - SCRATCH_DIR=".scratch" - mkdir "${SCRATCH_DIR}" - ARCHITECTURE=$(arch) - - tar -xvf tests/integration/resources/aws-lambda-rie.tar.gz --directory "${SCRATCH_DIR}" + - > + if [[ "$ARCHITECTURE" == "x86_64" ]]; then + RIE="aws-lambda-rie" + elif [[ "$ARCHITECTURE" == "aarch64" ]]; then + RIE="aws-lambda-rie-arm64" + else + echo "Architecture $ARCHITECTURE is not currently supported." + exit 1 + fi + - tar -xvf tests/integration/resources/${RIE}.tar.gz --directory "${SCRATCH_DIR}" - > cp "tests/integration/docker/Dockerfile.echo.${OS_DISTRIBUTION}" \ "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - > - echo "COPY ${SCRATCH_DIR}/aws-lambda-rie /usr/bin/aws-lambda-rie" >> \ + echo "COPY ${SCRATCH_DIR}/${RIE} /usr/bin/${RIE}" >> \ "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - > if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; @@ -62,12 +70,11 @@ phases: - > docker run \ --detach \ - -e "PYTHON_LOCATION=${PYTHON_LOCATION}" \ --name "${TEST_NAME}-app" \ --network "${TEST_NAME}-network" \ --entrypoint="" \ "${IMAGE_TAG}" \ - sh -c '/usr/bin/aws-lambda-rie ${PYTHON_LOCATION} -m awslambdaric app.handler' + sh -c "/usr/bin/${RIE} ${PYTHON_LOCATION} -m awslambdaric app.handler" - sleep 2 - > docker run \ @@ -83,19 +90,20 @@ phases: echo "Response: ${actual}" if [[ "$actual" != "$expected" ]]; then echo "fail! runtime: $RUNTIME - expected output $expected - got $actual" - echo "---------Container Logs: ${TEST_NAME}-app----------" - echo - docker logs "${TEST_NAME}-app" || true - echo - echo "---------------------------------------------------" - echo "--------Container Logs: ${TEST_NAME}-tester--------" - echo - docker logs "${TEST_NAME}-tester" || true - echo - echo "---------------------------------------------------" exit -1 fi finally: + - | + echo "---------Container Logs: ${TEST_NAME}-app----------" + echo + docker logs "${TEST_NAME}-app" || true + echo + echo "---------------------------------------------------" + echo "--------Container Logs: ${TEST_NAME}-tester--------" + echo + docker logs "${TEST_NAME}-tester" || true + echo + echo "---------------------------------------------------" - echo "Cleaning up..." - docker stop "${TEST_NAME}-app" || true - docker rm --force "${TEST_NAME}-app" || true diff --git a/tests/integration/codebuild/buildspec.os.centos.yml b/tests/integration/codebuild/buildspec.os.centos.yml index e6930b9..30edaa4 100644 --- a/tests/integration/codebuild/buildspec.os.centos.yml +++ b/tests/integration/codebuild/buildspec.os.centos.yml @@ -15,7 +15,7 @@ batch: env: variables: DISTRO_VERSION: - - "7" + - "8" RUNTIME_VERSION: - "3.8" - "3.9" diff --git a/tests/integration/codebuild/buildspec.os.debian.yml b/tests/integration/codebuild/buildspec.os.debian.yml index 7365f07..79ca7b1 100644 --- a/tests/integration/codebuild/buildspec.os.debian.yml +++ b/tests/integration/codebuild/buildspec.os.debian.yml @@ -15,7 +15,7 @@ batch: env: variables: DISTRO_VERSION: - - "buster" + - "bookworm" - "bullseye" RUNTIME_VERSION: - "3.8" diff --git a/tests/integration/codebuild/buildspec.os.ubuntu.yml b/tests/integration/codebuild/buildspec.os.ubuntu.yml index 2e312f6..1eabb73 100644 --- a/tests/integration/codebuild/buildspec.os.ubuntu.yml +++ b/tests/integration/codebuild/buildspec.os.ubuntu.yml @@ -15,8 +15,8 @@ batch: env: variables: DISTRO_VERSION: - - "20.04" - "22.04" + - "24.04" RUNTIME_VERSION: - "3.8" - "3.9" diff --git a/tests/integration/docker/Dockerfile.echo.alpine b/tests/integration/docker/Dockerfile.echo.alpine index a53efc0..7203b06 100644 --- a/tests/integration/docker/Dockerfile.echo.alpine +++ b/tests/integration/docker/Dockerfile.echo.alpine @@ -9,6 +9,9 @@ FROM public.ecr.aws/docker/library/python:${RUNTIME_VERSION}-alpine${DISTRO_VERS RUN apk add --no-cache \ libstdc++ +# https://github.com/aws/aws-lambda-python-runtime-interface-client/issues/144 +RUN echo https://dl-cdn.alpinelinux.org/alpine/v3.19/main >> /etc/apk/repositories +RUN echo https://dl-cdn.alpinelinux.org/alpine/v3.19/community >> /etc/apk/repositories # Stage 2 - build function and dependencies FROM python-alpine AS build-image @@ -16,7 +19,7 @@ FROM python-alpine AS build-image RUN apk add --no-cache \ build-base \ libtool \ - autoconf \ + autoconf=2.71-r2 \ automake \ elfutils-dev \ make \