Skip to content

Commit

Permalink
chore: Deprecate support java8 for provided (#137)
Browse files Browse the repository at this point in the history
* Deprecate support java8 for provided

* Remove java8 building from build_all_images.sh

* update gh action to skip dotnet8 arm tests

* update matrix

* fix condition

---------

Co-authored-by: Wing Fung Lau <[email protected]>
  • Loading branch information
hnnasit and hawflau authored Mar 27, 2024
1 parent 8fcb96f commit 8c57ea3
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 292 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
fail-fast: false
matrix:
runtime:
- "java8"
- "provided"
- "go1x"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -83,6 +82,10 @@ jobs:
- "python311"
- "python312"
- "ruby32"
include:
- skip_arm_test: false
- runtime: "dotnet8"
skip_arm_test: true
runs-on: ubuntu-latest
needs: [get-sam-cli-version]
steps:
Expand All @@ -97,3 +100,4 @@ jobs:
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} make build-multi-arch
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} ARCH=x86_64 make test
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} ARCH=arm64 make test
if: ${{ ! matrix.skip_arm_test }}
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export DOCKER_CONTENT_TRUST := 0
export DOCKER_CLI_EXPERIMENTAL := enabled

# image suffix lookup
IS_java8 := java8
IS_provided := provided
IS_go1x := go1.x
IS_dotnet6 := dotnet6
Expand Down Expand Up @@ -56,7 +55,7 @@ build-multi-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

build-x86_64-arch: pre-build
ifeq ($(strip $(RUNTIME)), $(IS_java8)) || ($(strip $(RUNTIME)), $(IS_provided)) || ($(strip $(RUNTIME)), $(IS_go1x))
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
Expand Down
70 changes: 0 additions & 70 deletions build-image-src/Dockerfile-java8

This file was deleted.

1 change: 0 additions & 1 deletion build-image-src/build_all_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export DOCKER_CONTENT_TRUST=0
export DOCKER_CLI_EXPERIMENTAL=enabled

# Single arch images
docker build -f Dockerfile-java8 -t amazon/aws-sam-cli-build-image-java8:x86_64 --build-arg SAM_CLI_VERSION=$SAM_CLI_VERSION . &
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
Expand Down
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[pytest]
markers =
java8
provided
go1x
dotnet6
Expand Down
52 changes: 0 additions & 52 deletions tests/apps/java8/sam-test-app/HelloWorldFunction/pom.xml

This file was deleted.

This file was deleted.

63 changes: 0 additions & 63 deletions tests/apps/java8/sam-test-app/events/event.json

This file was deleted.

43 changes: 0 additions & 43 deletions tests/apps/java8/sam-test-app/template.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions tests/test_build_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,6 @@
from tests.build_image_base_test import BuildImageBase, AL2023BasedBuildImageBase


@pytest.mark.java8x86_64
class TestBIJava8(BuildImageBase):
__test__ = True

@classmethod
def setUpClass(cls):
super().setUpClass("java8", "Dockerfile-java8", "maven")

def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(
self.check_package_output("java -version", 'openjdk version "1.8', True)
)
self.assertTrue(self.is_package_present("mvn"))
self.assertTrue(self.is_package_present("gradle"))
self.assertTrue(self.is_architecture("x86_64"))


@pytest.mark.java8_al2x86_64
class TestBIJava8AL2(BuildImageBase):
Expand Down

0 comments on commit 8c57ea3

Please sign in to comment.