From eb28da80b882f5b350241cd54d56ee772f64e6c6 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 31 Jul 2024 17:22:41 +0100 Subject: [PATCH 01/14] Empty-Commit From 5b5e74d2f613f95f0f6c3c4f56d7434254d8d56a Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 31 Jul 2024 17:41:11 +0100 Subject: [PATCH 02/14] Update disto versions --- .github/workflows/test-on-push-and-pr.yml | 8 -- README.md | 1 - .../codebuild/buildspec.os.alpine.yml | 8 +- .../codebuild/buildspec.os.amazonlinux.1.yml | 104 ---------------- .../codebuild/buildspec.os.amazonlinux.2.yml | 4 +- .../codebuild/buildspec.os.centos.yml | 112 ----------------- .../codebuild/buildspec.os.debian.yml | 5 +- .../codebuild/buildspec.os.ubuntu.yml | 4 +- .../integration/docker/Dockerfile.echo.centos | 117 ------------------ 9 files changed, 9 insertions(+), 354 deletions(-) delete mode 100644 tests/integration/codebuild/buildspec.os.amazonlinux.1.yml delete mode 100644 tests/integration/codebuild/buildspec.os.centos.yml delete mode 100644 tests/integration/docker/Dockerfile.echo.centos diff --git a/.github/workflows/test-on-push-and-pr.yml b/.github/workflows/test-on-push-and-pr.yml index f12bf0e..70d7a8e 100644 --- a/.github/workflows/test-on-push-and-pr.yml +++ b/.github/workflows/test-on-push-and-pr.yml @@ -31,14 +31,6 @@ jobs: - name: Run amazonlinux integration tests run: DISTRO=amazonlinux make test-integ - centos: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Run centos integration tests - run: DISTRO=centos make test-integ - debian: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 248fde4..8a448bd 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ First step is to choose the base image to be used. The supported Linux OS distri - Amazon Linux 2 - Alpine - - CentOS - Debian - Ubuntu diff --git a/tests/integration/codebuild/buildspec.os.alpine.yml b/tests/integration/codebuild/buildspec.os.alpine.yml index 8d13f9e..7097144 100644 --- a/tests/integration/codebuild/buildspec.os.alpine.yml +++ b/tests/integration/codebuild/buildspec.os.alpine.yml @@ -15,9 +15,9 @@ batch: env: variables: DISTRO_VERSION: - - "3.13" - - "3.14" - - "3.15" + - "3.17" + - "3.18" + - "3.19" RUNTIME_VERSION: - "3.8" - "3.9" @@ -65,7 +65,7 @@ phases: -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ -t "${IMAGE_TAG}" \ --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" --load build: commands: - set -x diff --git a/tests/integration/codebuild/buildspec.os.amazonlinux.1.yml b/tests/integration/codebuild/buildspec.os.amazonlinux.1.yml deleted file mode 100644 index 91bb021..0000000 --- a/tests/integration/codebuild/buildspec.os.amazonlinux.1.yml +++ /dev/null @@ -1,104 +0,0 @@ -version: 0.2 - -env: - variables: - OS_DISTRIBUTION: amazonlinux - PYTHON_LOCATION: "/usr/local/bin/python3" - TEST_NAME: "aws-lambda-python-rtc-amazonlinux-test" -batch: - build-matrix: - static: - ignore-failure: false - env: - privileged-mode: true - dynamic: - env: - variables: - DISTRO_VERSION: - - "1" - RUNTIME_VERSION: - - "3.7" - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" -phases: - pre_build: - commands: - - export IMAGE_TAG="python-${OS_DISTRIBUTION}-${DISTRO_VERSION}:${RUNTIME_VERSION}" - - echo "Extracting and including the Runtime Interface Emulator" - - SCRATCH_DIR=".scratch" - - mkdir "${SCRATCH_DIR}" - - ARCHITECTURE=$(arch) - - tar -xvf tests/integration/resources/aws-lambda-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" >> \ - "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - - > - if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; - then - echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." - else - echo "Performing DockerHub login . . ." - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - fi - - echo "Building image ${IMAGE_TAG}" - - > - docker build . \ - -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ - -t "${IMAGE_TAG}" \ - --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" \ - --build-arg ARCHITECTURE="${ARCHITECTURE}" - build: - commands: - - set -x - - echo "Running Image ${IMAGE_TAG}" - - docker network create "${TEST_NAME}-network" - - > - 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' - - sleep 2 - - > - docker run \ - --name "${TEST_NAME}-tester" \ - --env "TARGET=${TEST_NAME}-app" \ - --network "${TEST_NAME}-network" \ - --entrypoint="" \ - "${IMAGE_TAG}" \ - sh -c 'curl -X POST "http://${TARGET}:8080/2015-03-31/functions/function/invocations" -d "{}" --max-time 10' - - actual="$(docker logs --tail 1 "${TEST_NAME}-tester" | xargs)" - - expected='success' - - | - 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 "Cleaning up..." - - docker stop "${TEST_NAME}-app" || true - - docker rm --force "${TEST_NAME}-app" || true - - docker stop "${TEST_NAME}-tester" || true - - docker rm --force "${TEST_NAME}-tester" || true - - docker network rm "${TEST_NAME}-network" || true diff --git a/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml b/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml index 38f2509..323d762 100644 --- a/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml +++ b/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml @@ -17,8 +17,6 @@ batch: DISTRO_VERSION: - "2" RUNTIME_VERSION: - - "3.7" - - "3.8" - "3.9" - "3.10" - "3.11" @@ -62,7 +60,7 @@ phases: -t "${IMAGE_TAG}" \ --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ --build-arg DISTRO_VERSION="${DISTRO_VERSION}" \ - --build-arg ARCHITECTURE="${ARCHITECTURE}" + --build-arg ARCHITECTURE="${ARCHITECTURE}" --load build: commands: - set -x diff --git a/tests/integration/codebuild/buildspec.os.centos.yml b/tests/integration/codebuild/buildspec.os.centos.yml deleted file mode 100644 index e6930b9..0000000 --- a/tests/integration/codebuild/buildspec.os.centos.yml +++ /dev/null @@ -1,112 +0,0 @@ -version: 0.2 - -env: - variables: - OS_DISTRIBUTION: centos - PYTHON_LOCATION: "/usr/local/bin/python3" - TEST_NAME: "aws-lambda-python-rtc-centos-test" -batch: - build-matrix: - static: - ignore-failure: false - env: - privileged-mode: true - dynamic: - env: - variables: - DISTRO_VERSION: - - "7" - RUNTIME_VERSION: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" -phases: - pre_build: - commands: - - export IMAGE_TAG="python-${OS_DISTRIBUTION}-${DISTRO_VERSION}:${RUNTIME_VERSION}" - - echo "Extracting and including the Runtime Interface Emulator" - - SCRATCH_DIR=".scratch" - - mkdir "${SCRATCH_DIR}" - - ARCHITECTURE=$(arch) - - > - 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}/${RIE} /usr/bin/${RIE}" >> \ - "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - - > - if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; - then - echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." - else - echo "Performing DockerHub login . . ." - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - fi - - echo "Building image ${IMAGE_TAG}" - - > - docker build . \ - -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ - -t "${IMAGE_TAG}" \ - --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" \ - --build-arg ARCHITECTURE="${ARCHITECTURE}" - build: - commands: - - set -x - - echo "Running Image ${IMAGE_TAG}" - - docker network create "${TEST_NAME}-network" - - > - docker run \ - --detach \ - --name "${TEST_NAME}-app" \ - --network "${TEST_NAME}-network" \ - --entrypoint="" \ - "${IMAGE_TAG}" \ - sh -c "/usr/bin/${RIE} ${PYTHON_LOCATION} -m awslambdaric app.handler" - - sleep 2 - - > - docker run \ - --name "${TEST_NAME}-tester" \ - --env "TARGET=${TEST_NAME}-app" \ - --network "${TEST_NAME}-network" \ - --entrypoint="" \ - "${IMAGE_TAG}" \ - sh -c 'curl -X POST "http://${TARGET}:8080/2015-03-31/functions/function/invocations" -d "{}" --max-time 10' - - actual="$(docker logs --tail 1 "${TEST_NAME}-tester" | xargs)" - - expected='success' - - | - echo "Response: ${actual}" - if [[ "$actual" != "$expected" ]]; then - echo "fail! runtime: $RUNTIME - expected output $expected - got $actual" - 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 - - docker stop "${TEST_NAME}-tester" || true - - docker rm --force "${TEST_NAME}-tester" || true - - docker network rm "${TEST_NAME}-network" || true diff --git a/tests/integration/codebuild/buildspec.os.debian.yml b/tests/integration/codebuild/buildspec.os.debian.yml index 7365f07..d3eae2d 100644 --- a/tests/integration/codebuild/buildspec.os.debian.yml +++ b/tests/integration/codebuild/buildspec.os.debian.yml @@ -15,10 +15,9 @@ batch: env: variables: DISTRO_VERSION: - - "buster" + - "bookworm" - "bullseye" RUNTIME_VERSION: - - "3.8" - "3.9" - "3.10" - "3.11" @@ -64,7 +63,7 @@ phases: -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ -t "${IMAGE_TAG}" \ --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" --load build: commands: - set -x diff --git a/tests/integration/codebuild/buildspec.os.ubuntu.yml b/tests/integration/codebuild/buildspec.os.ubuntu.yml index 2e312f6..2b5e61b 100644 --- a/tests/integration/codebuild/buildspec.os.ubuntu.yml +++ b/tests/integration/codebuild/buildspec.os.ubuntu.yml @@ -17,8 +17,8 @@ batch: DISTRO_VERSION: - "20.04" - "22.04" + - "24.04" RUNTIME_VERSION: - - "3.8" - "3.9" - "3.10" - "3.11" @@ -61,7 +61,7 @@ phases: -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ -t "${IMAGE_TAG}" \ --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" --load build: commands: - set -x diff --git a/tests/integration/docker/Dockerfile.echo.centos b/tests/integration/docker/Dockerfile.echo.centos deleted file mode 100644 index e2dd3d0..0000000 --- a/tests/integration/docker/Dockerfile.echo.centos +++ /dev/null @@ -1,117 +0,0 @@ -ARG DISTRO_VERSION - -# Stage 1 - bundle base image + runtime interface client -# Grab a fresh copy of the image and install Python -FROM public.ecr.aws/docker/library/centos:${DISTRO_VERSION} AS python-centos-builder - -ARG RUNTIME_VERSION - -# Install apt dependencies -RUN yum install -y \ - gcc \ - gcc-c++ \ - tar \ - gzip \ - make \ - autoconf \ - automake \ - freetype-devel \ - yum-utils \ - findutils \ - openssl-devel \ - wget \ - libffi-devel \ - sqlite-devel - -RUN RUNTIME_LATEST_VERSION=${RUNTIME_VERSION}.$(curl -s https://www.python.org/ftp/python/ | \ - grep -oE "href=\"$(echo ${RUNTIME_VERSION} | sed "s/\\./\\\./g")\.[0-9]+" | \ - cut -d. -f3 | \ - sort -rn | \ - while read -r patch; do \ - $(wget -c https://www.python.org/ftp/python/${RUNTIME_VERSION}.$patch/Python-${RUNTIME_VERSION}.$patch.tgz -O Python-${RUNTIME_VERSION}.$patch.tgz); \ - [ $? -eq 0 ] && echo $patch && break; \ - done) \ - && tar -xzf Python-${RUNTIME_LATEST_VERSION}.tgz \ - && cd Python-${RUNTIME_LATEST_VERSION} \ - && ./configure --prefix=/usr/local --enable-shared \ - && make \ - && make install \ - && ln -s /usr/local/bin/python${RUNTIME_VERSION} /usr/local/bin/python${RUNTIME_LATEST_VERSION} - -# Stage 2 - clean python build dependencies -FROM public.ecr.aws/docker/library/centos:${DISTRO_VERSION} AS python-centos -RUN yum install -y \ - libffi-devel - -# Copy the compiled python to /usr/local -COPY --from=python-centos-builder /usr/local /usr/local -ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH - -# Stage 3 - build function and dependencies -FROM python-centos-builder AS build-image -ARG RUNTIME_VERSION -ARG ARCHITECTURE - -# Install aws-lambda-cpp build dependencies -RUN yum install -y \ - tar \ - gzip \ - make \ - autoconf \ - automake \ - libtool \ - libcurl-devel \ - gcc-c++ \ - wget - -# Install a modern CMake -RUN wget --quiet -O cmake-install https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-linux-${ARCHITECTURE}.sh && \ - sh cmake-install --skip-license --prefix=/usr --exclude-subdirectory; - -ENV PATH=/usr/local/bin:$PATH -ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH - - -# Include global args in this stage of the build -ARG RIC_BUILD_DIR="/home/build/" -# Create function directory -RUN mkdir -p ${RIC_BUILD_DIR} -# Copy function code and Runtime Interface Client .tgz -WORKDIR ${RIC_BUILD_DIR} -COPY . . -RUN make init build && \ - mv ./dist/awslambdaric-*.tar.gz ./dist/awslambdaric-test.tar.gz - -# Include global args in this stage of the build -ARG FUNCTION_DIR="/home/app/" -# Create function directory -RUN mkdir -p ${FUNCTION_DIR} -# Copy function code -COPY tests/integration/test-handlers/echo/* ${FUNCTION_DIR} -# Copy Runtime Interface Client .tgz -RUN cp ./dist/awslambdaric-test.tar.gz ${FUNCTION_DIR}/awslambdaric-test.tar.gz - -# Install the function's dependencies -WORKDIR ${FUNCTION_DIR} -ARG ENABLE_LTO=OFF -ENV ENABLE_LTO ${ENABLE_LTO} -RUN python${RUNTIME_VERSION} -m pip install \ - awslambdaric-test.tar.gz \ - --verbose \ - --target ${FUNCTION_DIR} && \ - rm awslambdaric-test.tar.gz - - -# Stage 4 - final runtime interface client image -# Grab a fresh copy of the Python image -FROM python-centos - -# Include global arg in this stage of the build -ARG FUNCTION_DIR="/home/app/" -# Set working directory to function root directory -WORKDIR ${FUNCTION_DIR} -# Copy in the built dependencies -COPY --from=build-image ${FUNCTION_DIR} ${FUNCTION_DIR} - -ENTRYPOINT [ "/usr/local/bin/python3", "-m", "awslambdaric" ] -CMD [ "app.handler" ] From a41e7d32d86d542ae27ec04bad63ffaafd8dd4eb Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 31 Jul 2024 18:18:17 +0100 Subject: [PATCH 03/14] use cache mirror --- .github/workflows/test-on-push-and-pr.yml | 10 +++++----- tests/integration/codebuild/buildspec.os.alpine.yml | 9 ++------- .../codebuild/buildspec.os.amazonlinux.2.yml | 9 ++------- tests/integration/codebuild/buildspec.os.debian.yml | 9 ++------- tests/integration/codebuild/buildspec.os.ubuntu.yml | 9 ++------- 5 files changed, 13 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test-on-push-and-pr.yml b/.github/workflows/test-on-push-and-pr.yml index 70d7a8e..5b80d23 100644 --- a/.github/workflows/test-on-push-and-pr.yml +++ b/.github/workflows/test-on-push-and-pr.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run 'pr' target run: make pr @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run alpine integration tests run: DISTRO=alpine make test-integ @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run amazonlinux integration tests run: DISTRO=amazonlinux make test-integ @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run debian integration tests run: DISTRO=debian make test-integ @@ -43,6 +43,6 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run ubuntu integration tests run: DISTRO=ubuntu make test-integ \ No newline at end of file diff --git a/tests/integration/codebuild/buildspec.os.alpine.yml b/tests/integration/codebuild/buildspec.os.alpine.yml index 7097144..be58bda 100644 --- a/tests/integration/codebuild/buildspec.os.alpine.yml +++ b/tests/integration/codebuild/buildspec.os.alpine.yml @@ -52,13 +52,8 @@ phases: echo "COPY ${SCRATCH_DIR}/${RIE} /usr/bin/${RIE}" >> \ "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - > - if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; - then - echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." - else - echo "Performing DockerHub login . . ." - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - fi + echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' > /etc/docker/daemon.json + service docker restart - echo "Building image ${IMAGE_TAG}" - > docker build . \ diff --git a/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml b/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml index 323d762..4a8a3b8 100644 --- a/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml +++ b/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml @@ -46,13 +46,8 @@ phases: echo "COPY ${SCRATCH_DIR}/${RIE} /usr/bin/${RIE}" >> \ "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - > - if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; - then - echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." - else - echo "Performing DockerHub login . . ." - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - fi + echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' > /etc/docker/daemon.json + service docker restart - echo "Building image ${IMAGE_TAG}" - > docker build . \ diff --git a/tests/integration/codebuild/buildspec.os.debian.yml b/tests/integration/codebuild/buildspec.os.debian.yml index d3eae2d..8cf1fef 100644 --- a/tests/integration/codebuild/buildspec.os.debian.yml +++ b/tests/integration/codebuild/buildspec.os.debian.yml @@ -50,13 +50,8 @@ phases: echo "RUN apt-get update && apt-get install -y curl" >> \ "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - > - if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; - then - echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." - else - echo "Performing DockerHub login . . ." - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - fi + echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' > /etc/docker/daemon.json + service docker restart - echo "Building image ${IMAGE_TAG}" - > docker build . \ diff --git a/tests/integration/codebuild/buildspec.os.ubuntu.yml b/tests/integration/codebuild/buildspec.os.ubuntu.yml index 2b5e61b..074e3ce 100644 --- a/tests/integration/codebuild/buildspec.os.ubuntu.yml +++ b/tests/integration/codebuild/buildspec.os.ubuntu.yml @@ -48,13 +48,8 @@ phases: echo "COPY ${SCRATCH_DIR}/${RIE} /usr/bin/${RIE}" >> \ "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" - > - if [[ -z "${DOCKERHUB_USERNAME}" && -z "${DOCKERHUB_PASSWORD}" ]]; - then - echo "DockerHub credentials not set as CodeBuild environment variables. Continuing without docker login." - else - echo "Performing DockerHub login . . ." - docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD - fi + echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' > /etc/docker/daemon.json + service docker restart - echo "Building image ${IMAGE_TAG}" - > docker build . \ From 31c341fe1d082ef96dad1f2456ddf814269cfa99 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 1 Aug 2024 11:45:25 +0100 Subject: [PATCH 04/14] Remove python3.8/alpine configuration --- tests/integration/codebuild/buildspec.os.alpine.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/codebuild/buildspec.os.alpine.yml b/tests/integration/codebuild/buildspec.os.alpine.yml index be58bda..4592c92 100644 --- a/tests/integration/codebuild/buildspec.os.alpine.yml +++ b/tests/integration/codebuild/buildspec.os.alpine.yml @@ -19,7 +19,6 @@ batch: - "3.18" - "3.19" RUNTIME_VERSION: - - "3.8" - "3.9" - "3.10" - "3.11" From f184ef41063c23ba59646544352a0896680d9760 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 1 Aug 2024 14:26:17 +0100 Subject: [PATCH 05/14] Remove 24.04 temporarily, as it doesn't have some packages in repo --- tests/integration/codebuild/buildspec.os.ubuntu.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/codebuild/buildspec.os.ubuntu.yml b/tests/integration/codebuild/buildspec.os.ubuntu.yml index 074e3ce..300e171 100644 --- a/tests/integration/codebuild/buildspec.os.ubuntu.yml +++ b/tests/integration/codebuild/buildspec.os.ubuntu.yml @@ -17,7 +17,6 @@ batch: DISTRO_VERSION: - "20.04" - "22.04" - - "24.04" RUNTIME_VERSION: - "3.9" - "3.10" From b44ae16f4a4d53dd4e3daaf2e3ea0621ea27b0e0 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 1 Aug 2024 16:40:34 +0100 Subject: [PATCH 06/14] fix SSL errors in AmazonLinux --- tests/integration/codebuild/buildspec.os.ubuntu.yml | 1 + tests/integration/docker/Dockerfile.echo.amazonlinux | 4 +++- tests/integration/docker/Dockerfile.echo.ubuntu | 11 +++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/integration/codebuild/buildspec.os.ubuntu.yml b/tests/integration/codebuild/buildspec.os.ubuntu.yml index 300e171..074e3ce 100644 --- a/tests/integration/codebuild/buildspec.os.ubuntu.yml +++ b/tests/integration/codebuild/buildspec.os.ubuntu.yml @@ -17,6 +17,7 @@ batch: DISTRO_VERSION: - "20.04" - "22.04" + - "24.04" RUNTIME_VERSION: - "3.9" - "3.10" diff --git a/tests/integration/docker/Dockerfile.echo.amazonlinux b/tests/integration/docker/Dockerfile.echo.amazonlinux index 188de01..95f84f0 100644 --- a/tests/integration/docker/Dockerfile.echo.amazonlinux +++ b/tests/integration/docker/Dockerfile.echo.amazonlinux @@ -17,8 +17,10 @@ RUN yum install -y \ freetype-devel \ yum-utils \ findutils \ - openssl-devel \ wget \ + openssl11 \ + openssl11-devel \ + bzip2-devel \ libffi-devel \ sqlite-devel diff --git a/tests/integration/docker/Dockerfile.echo.ubuntu b/tests/integration/docker/Dockerfile.echo.ubuntu index 692b3f2..72a5071 100644 --- a/tests/integration/docker/Dockerfile.echo.ubuntu +++ b/tests/integration/docker/Dockerfile.echo.ubuntu @@ -16,8 +16,15 @@ RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && \ apt-get install -y \ curl \ - python${RUNTIME_VERSION} \ - python${RUNTIME_VERSION}-distutils + python${RUNTIME_VERSION} + +# specific distutils package name for ubuntu24.04 +RUN if [ ${RUNTIME_VERSION} == "3.12" ] && [ ${DISTRO_VERSION} == "24.04" ]; + then \ + apt-get install -y python3-distutils-extra \ + else \ + apt-get install -y python${RUNTIME_VERSION}-distutils \ + fi RUN ln -s /usr/bin/python${RUNTIME_VERSION} /usr/local/bin/python3 From 618fd9a45262d245bb594986bb535e5a45ad6775 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 1 Aug 2024 16:44:22 +0100 Subject: [PATCH 07/14] fix typo --- tests/integration/docker/Dockerfile.echo.ubuntu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/docker/Dockerfile.echo.ubuntu b/tests/integration/docker/Dockerfile.echo.ubuntu index 72a5071..4942263 100644 --- a/tests/integration/docker/Dockerfile.echo.ubuntu +++ b/tests/integration/docker/Dockerfile.echo.ubuntu @@ -19,7 +19,7 @@ RUN apt-get update && \ python${RUNTIME_VERSION} # specific distutils package name for ubuntu24.04 -RUN if [ ${RUNTIME_VERSION} == "3.12" ] && [ ${DISTRO_VERSION} == "24.04" ]; +RUN if [ ${RUNTIME_VERSION} == "3.12" ] && [ ${DISTRO_VERSION} == "24.04" ]; \ then \ apt-get install -y python3-distutils-extra \ else \ From 17bdefcf6aaaf581dc0532ebffe4cbc2fbd5eb35 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 1 Aug 2024 17:41:30 +0100 Subject: [PATCH 08/14] Fix syntax error in ubuntu yml --- tests/integration/docker/Dockerfile.echo.ubuntu | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/integration/docker/Dockerfile.echo.ubuntu b/tests/integration/docker/Dockerfile.echo.ubuntu index 4942263..b3f87bb 100644 --- a/tests/integration/docker/Dockerfile.echo.ubuntu +++ b/tests/integration/docker/Dockerfile.echo.ubuntu @@ -19,11 +19,10 @@ RUN apt-get update && \ python${RUNTIME_VERSION} # specific distutils package name for ubuntu24.04 -RUN if [ ${RUNTIME_VERSION} == "3.12" ] && [ ${DISTRO_VERSION} == "24.04" ]; \ - then \ - apt-get install -y python3-distutils-extra \ +RUN if [ ${RUNTIME_VERSION} == "3.12" ] && [ ${DISTRO_VERSION} == "24.04" ]; then \ + apt-get install -y python3-distutils-extra; \ else \ - apt-get install -y python${RUNTIME_VERSION}-distutils \ + apt-get install -y python${RUNTIME_VERSION}-distutils; \ fi RUN ln -s /usr/bin/python${RUNTIME_VERSION} /usr/local/bin/python3 From 5f42ada94f11a029266417705fd39babaa19ffaa Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 1 Aug 2024 22:47:05 +0100 Subject: [PATCH 09/14] AmazonLinux fixes --- tests/integration/codebuild/buildspec.os.amazonlinux.2.yml | 3 ++- tests/integration/docker/Dockerfile.echo.amazonlinux | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml b/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml index 4a8a3b8..f8b7126 100644 --- a/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml +++ b/tests/integration/codebuild/buildspec.os.amazonlinux.2.yml @@ -55,7 +55,8 @@ phases: -t "${IMAGE_TAG}" \ --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ --build-arg DISTRO_VERSION="${DISTRO_VERSION}" \ - --build-arg ARCHITECTURE="${ARCHITECTURE}" --load + --build-arg ARCHITECTURE="${ARCHITECTURE}" \ + --load build: commands: - set -x diff --git a/tests/integration/docker/Dockerfile.echo.amazonlinux b/tests/integration/docker/Dockerfile.echo.amazonlinux index 95f84f0..168c6a2 100644 --- a/tests/integration/docker/Dockerfile.echo.amazonlinux +++ b/tests/integration/docker/Dockerfile.echo.amazonlinux @@ -80,6 +80,11 @@ RUN mkdir -p ${RIC_BUILD_DIR} # Copy function code and Runtime Interface Client .tgz WORKDIR ${RIC_BUILD_DIR} COPY . . + +# distutils no longer available in python3.12 and later +# https://docs.python.org/3/whatsnew/3.12.html +# https://peps.python.org/pep-0632/ +RUN if [ $(cut -d '.' -f 2 <<< ${RUNTIME_VERSION}) -ge 12 ]; then pip3 install setuptools; fi RUN make init build test && \ mv ./dist/awslambdaric-*.tar.gz ./dist/awslambdaric-test.tar.gz From e8fb730e23ddaf7309a28686b35a8281942cbf79 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 1 Aug 2024 23:22:45 +0100 Subject: [PATCH 10/14] Fix ubuntu24.04/3.12 --- .../codebuild/buildspec.os.ubuntu.yml | 3 +- .../integration/docker/Dockerfile.echo.ubuntu | 67 ++++++++++--------- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/tests/integration/codebuild/buildspec.os.ubuntu.yml b/tests/integration/codebuild/buildspec.os.ubuntu.yml index 074e3ce..10a55a0 100644 --- a/tests/integration/codebuild/buildspec.os.ubuntu.yml +++ b/tests/integration/codebuild/buildspec.os.ubuntu.yml @@ -56,7 +56,8 @@ phases: -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ -t "${IMAGE_TAG}" \ --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" --load + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" \ + --load build: commands: - set -x diff --git a/tests/integration/docker/Dockerfile.echo.ubuntu b/tests/integration/docker/Dockerfile.echo.ubuntu index b3f87bb..66e1ba7 100644 --- a/tests/integration/docker/Dockerfile.echo.ubuntu +++ b/tests/integration/docker/Dockerfile.echo.ubuntu @@ -9,46 +9,45 @@ ENV DEBIAN_FRONTEND=noninteractive ARG RUNTIME_VERSION # Install python and pip -RUN apt-get update && \ - apt-get install -y \ - software-properties-common +RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && \ - apt-get install -y \ - curl \ - python${RUNTIME_VERSION} - -# specific distutils package name for ubuntu24.04 -RUN if [ ${RUNTIME_VERSION} == "3.12" ] && [ ${DISTRO_VERSION} == "24.04" ]; then \ - apt-get install -y python3-distutils-extra; \ - else \ - apt-get install -y python${RUNTIME_VERSION}-distutils; \ - fi + apt-get install -y curl python${RUNTIME_VERSION} RUN ln -s /usr/bin/python${RUNTIME_VERSION} /usr/local/bin/python3 + + + # Stage 2 - build function and dependencies FROM python-image AS python-ubuntu-builder ARG RUNTIME_VERSION -RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" -RUN python${RUNTIME_VERSION} get-pip.py - # Install aws-lambda-cpp build dependencies RUN apt-get update && \ - apt-get install -y \ - g++ \ - gcc \ - tar \ - gzip \ - make \ - cmake \ - autoconf \ - automake \ - libtool \ - libcurl4-openssl-dev \ - python${RUNTIME_VERSION}-dev + apt-get install -y \ + g++ \ + gcc \ + tar \ + gzip \ + make \ + cmake \ + autoconf \ + automake \ + libtool \ + libcurl4-openssl-dev \ + python${RUNTIME_VERSION}-dev + +RUN if [ $(echo "${RUNTIME_VERSION}" | cut -d '.' -f 2) -ge 12 ]; then \ + apt-get install -y python3-setuptools python3-pip python${RUNTIME_VERSION}-venv && \ + python3 -m venv /home/venv; \ + else \ + curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" && \ + python${RUNTIME_VERSION} get-pip.py && \ + pip3 install virtualenv && \ + virtualenv /home/venv; \ + fi # Include global args in this stage of the build ARG RIC_BUILD_DIR="/home/build/" @@ -57,7 +56,9 @@ RUN mkdir -p ${RIC_BUILD_DIR} # Copy function code and Runtime Interface Client .tgz WORKDIR ${RIC_BUILD_DIR} COPY . . -RUN make init build test && \ +RUN . /home/venv/bin/activate && \ + pip install setuptools && \ + make init build test && \ mv ./dist/awslambdaric-*.tar.gz ./dist/awslambdaric-test.tar.gz # Include global args in this stage of the build @@ -71,13 +72,13 @@ RUN cp ./dist/awslambdaric-test.tar.gz ${FUNCTION_DIR}/awslambdaric-test.tar.gz # Install the function's dependencies WORKDIR ${FUNCTION_DIR} -RUN python${RUNTIME_VERSION} -m pip install \ - awslambdaric-test.tar.gz \ - --target ${FUNCTION_DIR} && \ +RUN python${RUNTIME_VERSION} -m pip install awslambdaric-test.tar.gz --target ${FUNCTION_DIR} && \ rm awslambdaric-test.tar.gz -# Stage 4 - final runtime interface client image + + +# Stage 3 - final runtime interface client image # Grab a fresh copy of the Python image FROM python-image From 50bd53e03c7623f8e0e89684498ac5a5fee60f0b Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Fri, 2 Aug 2024 16:13:23 +0100 Subject: [PATCH 11/14] Fix ubuntu tests --- .../integration/docker/Dockerfile.echo.ubuntu | 37 ++++++++----------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/tests/integration/docker/Dockerfile.echo.ubuntu b/tests/integration/docker/Dockerfile.echo.ubuntu index 66e1ba7..0ce3000 100644 --- a/tests/integration/docker/Dockerfile.echo.ubuntu +++ b/tests/integration/docker/Dockerfile.echo.ubuntu @@ -12,10 +12,17 @@ ARG RUNTIME_VERSION RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && \ - apt-get install -y curl python${RUNTIME_VERSION} - -RUN ln -s /usr/bin/python${RUNTIME_VERSION} /usr/local/bin/python3 - + apt-get install -y \ + curl \ + python${RUNTIME_VERSION} \ + python3-pip \ + python3-virtualenv + +# python3xx-distutils is needed for python < 3.12 +RUN if [ $(echo ${RUNTIME_VERSION} | cut -d '.' -f 2) -lt 12 ]; then \ + apt-get install -y python${RUNTIME_VERSION}-distutils; \ + fi +RUN virtualenv --python /usr/bin/python${RUNTIME_VERSION} --no-setuptools /home/venv @@ -25,8 +32,7 @@ FROM python-image AS python-ubuntu-builder ARG RUNTIME_VERSION # Install aws-lambda-cpp build dependencies -RUN apt-get update && \ - apt-get install -y \ +RUN apt-get install -y \ g++ \ gcc \ tar \ @@ -39,16 +45,6 @@ RUN apt-get update && \ libcurl4-openssl-dev \ python${RUNTIME_VERSION}-dev -RUN if [ $(echo "${RUNTIME_VERSION}" | cut -d '.' -f 2) -ge 12 ]; then \ - apt-get install -y python3-setuptools python3-pip python${RUNTIME_VERSION}-venv && \ - python3 -m venv /home/venv; \ - else \ - curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" && \ - python${RUNTIME_VERSION} get-pip.py && \ - pip3 install virtualenv && \ - virtualenv /home/venv; \ - fi - # Include global args in this stage of the build ARG RIC_BUILD_DIR="/home/build/" # Create function directory @@ -61,19 +57,18 @@ RUN . /home/venv/bin/activate && \ make init build test && \ mv ./dist/awslambdaric-*.tar.gz ./dist/awslambdaric-test.tar.gz + + # Include global args in this stage of the build ARG FUNCTION_DIR="/home/app/" # Create function directory RUN mkdir -p ${FUNCTION_DIR} # Copy function code COPY tests/integration/test-handlers/echo/* ${FUNCTION_DIR} -# Copy Runtime Interface Client .tgz -RUN cp ./dist/awslambdaric-test.tar.gz ${FUNCTION_DIR}/awslambdaric-test.tar.gz - # Install the function's dependencies WORKDIR ${FUNCTION_DIR} -RUN python${RUNTIME_VERSION} -m pip install awslambdaric-test.tar.gz --target ${FUNCTION_DIR} && \ - rm awslambdaric-test.tar.gz +RUN . /home/venv/bin/activate && \ + pip install ${RIC_BUILD_DIR}/dist/awslambdaric-test.tar.gz --target ${FUNCTION_DIR} From 27e3ec6f2e40b662979dfe47eeb50f471cc3bde8 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 7 Aug 2024 14:26:34 +0100 Subject: [PATCH 12/14] Remove Ubuntu 20.04 --- tests/integration/codebuild/buildspec.os.ubuntu.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/codebuild/buildspec.os.ubuntu.yml b/tests/integration/codebuild/buildspec.os.ubuntu.yml index 10a55a0..ac7c6db 100644 --- a/tests/integration/codebuild/buildspec.os.ubuntu.yml +++ b/tests/integration/codebuild/buildspec.os.ubuntu.yml @@ -15,7 +15,6 @@ batch: env: variables: DISTRO_VERSION: - - "20.04" - "22.04" - "24.04" RUNTIME_VERSION: From 106b6fdb8acfa7d557f713b9af22cba0e08afbef Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 7 Aug 2024 17:18:03 +0100 Subject: [PATCH 13/14] Fix alpine --- tests/integration/codebuild/buildspec.os.alpine.yml | 3 ++- tests/integration/codebuild/buildspec.os.debian.yml | 3 ++- tests/integration/docker/Dockerfile.echo.alpine | 10 ++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/integration/codebuild/buildspec.os.alpine.yml b/tests/integration/codebuild/buildspec.os.alpine.yml index 4592c92..563451f 100644 --- a/tests/integration/codebuild/buildspec.os.alpine.yml +++ b/tests/integration/codebuild/buildspec.os.alpine.yml @@ -59,7 +59,8 @@ phases: -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ -t "${IMAGE_TAG}" \ --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" --load + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" \ + --load build: commands: - set -x diff --git a/tests/integration/codebuild/buildspec.os.debian.yml b/tests/integration/codebuild/buildspec.os.debian.yml index 8cf1fef..008e6e8 100644 --- a/tests/integration/codebuild/buildspec.os.debian.yml +++ b/tests/integration/codebuild/buildspec.os.debian.yml @@ -58,7 +58,8 @@ phases: -f "${SCRATCH_DIR}/Dockerfile.echo.${OS_DISTRIBUTION}.tmp" \ -t "${IMAGE_TAG}" \ --build-arg RUNTIME_VERSION="${RUNTIME_VERSION}" \ - --build-arg DISTRO_VERSION="${DISTRO_VERSION}" --load + --build-arg DISTRO_VERSION="${DISTRO_VERSION}" \ + --load build: commands: - set -x diff --git a/tests/integration/docker/Dockerfile.echo.alpine b/tests/integration/docker/Dockerfile.echo.alpine index a53efc0..7e77e16 100644 --- a/tests/integration/docker/Dockerfile.echo.alpine +++ b/tests/integration/docker/Dockerfile.echo.alpine @@ -7,7 +7,8 @@ ARG DISTRO_VERSION FROM public.ecr.aws/docker/library/python:${RUNTIME_VERSION}-alpine${DISTRO_VERSION} AS python-alpine # Install libstdc++ RUN apk add --no-cache \ - libstdc++ + libstdc++ \ + binutils # Stage 2 - build function and dependencies @@ -39,15 +40,12 @@ ARG FUNCTION_DIR="/home/app/" RUN mkdir -p ${FUNCTION_DIR} # Copy function code COPY tests/integration/test-handlers/echo/* ${FUNCTION_DIR} -# Copy Runtime Interface Client .tgz -RUN cp ./dist/awslambdaric-test.tar.gz ${FUNCTION_DIR}/awslambdaric-test.tar.gz # Install the function's dependencies WORKDIR ${FUNCTION_DIR} RUN python${RUNTIME_VERSION} -m pip install \ - awslambdaric-test.tar.gz \ - --target ${FUNCTION_DIR} && \ - rm awslambdaric-test.tar.gz + ${RIC_BUILD_DIR}/dist/awslambdaric-test.tar.gz \ + --target ${FUNCTION_DIR} # Stage 3 - final runtime interface client image From 86e48c129e12ae56e6b1b159dc1c32b3e41092e9 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Wed, 7 Aug 2024 18:28:59 +0100 Subject: [PATCH 14/14] Remove duplicated tests from pr rule --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ff99587..521b61c 100644 --- a/Makefile +++ b/Makefile @@ -41,9 +41,10 @@ dev: init test # Verifications to run before sending a pull request .PHONY: pr -pr: init check-format check-security dev setup-codebuild-agent - CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild +pr: init check-format check-security dev +codebuild: setup-codebuild-agent + CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild .PHONY: clean clean: