Skip to content

Update os versions #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/integration/codebuild/buildspec.os.alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 \
Expand Down
1 change: 0 additions & 1 deletion tests/integration/codebuild/buildspec.os.amazonlinux.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ batch:
DISTRO_VERSION:
- "2"
RUNTIME_VERSION:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ batch:
env:
variables:
DISTRO_VERSION:
- "1"
- "2023"
RUNTIME_VERSION:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Expand All @@ -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}" ]];
Expand All @@ -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 \
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/codebuild/buildspec.os.centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ batch:
env:
variables:
DISTRO_VERSION:
- "7"
- "8"
RUNTIME_VERSION:
- "3.8"
- "3.9"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/codebuild/buildspec.os.debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ batch:
env:
variables:
DISTRO_VERSION:
- "buster"
- "bookworm"
- "bullseye"
RUNTIME_VERSION:
- "3.8"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/codebuild/buildspec.os.ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ batch:
env:
variables:
DISTRO_VERSION:
- "20.04"
- "22.04"
- "24.04"
RUNTIME_VERSION:
- "3.8"
- "3.9"
Expand Down
5 changes: 4 additions & 1 deletion tests/integration/docker/Dockerfile.echo.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ 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
# Install aws-lambda-cpp build dependencies
RUN apk add --no-cache \
build-base \
libtool \
autoconf \
autoconf=2.71-r2 \
automake \
elfutils-dev \
make \
Expand Down
Loading