Skip to content

Commit

Permalink
Deprecate provided, go1.x and java8 (#139)
Browse files Browse the repository at this point in the history
* Deprecate provided, go1.x and java8

* update gh build workflow

* update Makefile
  • Loading branch information
hawflau authored Mar 27, 2024
1 parent 8c57ea3 commit 8a1deb0
Show file tree
Hide file tree
Showing 16 changed files with 1 addition and 540 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ jobs:
if: github.repository_owner == 'aws' && always()
runs-on: ubuntu-latest
needs:
- build-single-arch
- build-multi-arch
steps:
- name: report-failure
if: |
needs.build-single-arch.result != 'success' ||
needs.build-multi-arch.result != 'success'
run: exit 1
- name: report-success
Expand All @@ -38,27 +36,6 @@ jobs:
- id: sam_cli_version
run: echo "sam_cli_version=$(curl -s https://pypi.org/pypi/aws-sam-cli/json | jq -r .info.version)" >> $GITHUB_OUTPUT

build-single-arch:
strategy:
fail-fast: false
matrix:
runtime:
- "provided"
- "go1x"
runs-on: ubuntu-latest
needs: [get-sam-cli-version]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- uses: aws-actions/setup-sam@v2
with:
use-installer: true
- run: make init
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} make build-single-arch
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} ARCH=x86_64 make test

build-multi-arch:
strategy:
fail-fast: false
Expand Down
9 changes: 0 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ export DOCKER_CONTENT_TRUST := 0
export DOCKER_CLI_EXPERIMENTAL := enabled

# image suffix lookup
IS_provided := provided
IS_go1x := go1.x
IS_dotnet6 := dotnet6
IS_dotnet7 := dotnet7
IS_dotnet8 := dotnet8
Expand Down Expand Up @@ -46,20 +44,13 @@ else
@echo "Building runtime $(RUNTIME)"
endif

build-single-arch: pre-build
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):x86_64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) ./build-image-src

build-multi-arch: pre-build
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):x86_64 --platform linux/amd64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) --build-arg AWS_CLI_ARCH=x86_64 --build-arg GO_ARCH=amd64 --build-arg IMAGE_ARCH=x86_64 ./build-image-src
docker run --privileged --rm tonistiigi/binfmt --install arm64
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):arm64 --platform linux/arm64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) --build-arg AWS_CLI_ARCH=aarch64 --build-arg GO_ARCH=arm64 --build-arg IMAGE_ARCH=arm64 ./build-image-src

build-x86_64-arch: pre-build
ifeq ($(strip $(RUNTIME)), $(IS_provided)) || ($(strip $(RUNTIME)), $(IS_go1x))
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):x86_64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) ./build-image-src
else
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):x86_64 --platform linux/amd64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) --build-arg AWS_CLI_ARCH=x86_64 --build-arg GO_ARCH=amd64 --build-arg IMAGE_ARCH=x86_64 ./build-image-src
endif

build-arm64-arch: pre-build
docker build -f build-image-src/Dockerfile-$(RUNTIME) -t amazon/aws-sam-cli-build-image-$(IS_$(RUNTIME)):arm64 --platform linux/arm64 --build-arg SAM_CLI_VERSION=$(SAM_CLI_VERSION) --build-arg AWS_CLI_ARCH=aarch64 --build-arg GO_ARCH=arm64 --build-arg IMAGE_ARCH=arm64 ./build-image-src
Expand Down
62 changes: 0 additions & 62 deletions build-image-src/Dockerfile-go1x

This file was deleted.

65 changes: 0 additions & 65 deletions build-image-src/Dockerfile-provided

This file was deleted.

6 changes: 1 addition & 5 deletions build-image-src/build_all_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
if [ -z ${SAM_CLI_VERSION+x} ];
then
echo "Must set SAM_CLI_VERSION to run this script."
exit -1;
exit 1;
else
echo "SAM CLI VERSION: $SAM_CLI_VERSION";
fi
Expand All @@ -16,10 +16,6 @@ fi
export DOCKER_CONTENT_TRUST=0
export DOCKER_CLI_EXPERIMENTAL=enabled

# Single arch images
docker build -f Dockerfile-provided -t amazon/aws-sam-cli-build-image-provided:x86_64 --build-arg SAM_CLI_VERSION=$SAM_CLI_VERSION . &
docker build -f Dockerfile-go1x -t amazon/aws-sam-cli-build-image-go1.x:x86_64 --build-arg SAM_CLI_VERSION=$SAM_CLI_VERSION . &
wait

# Multi arch images
# First build all x86
Expand Down
5 changes: 0 additions & 5 deletions tests/apps/go1.x/hello-world/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions tests/apps/go1.x/hello-world/go.sum

This file was deleted.

51 changes: 0 additions & 51 deletions tests/apps/go1.x/hello-world/main.go

This file was deleted.

64 changes: 0 additions & 64 deletions tests/apps/go1.x/hello-world/main_test.go

This file was deleted.

43 changes: 0 additions & 43 deletions tests/apps/go1.x/template.yaml

This file was deleted.

Loading

0 comments on commit 8a1deb0

Please sign in to comment.