diff --git a/.github/workflows/publish-dotnet.yml b/.github/workflows/publish-dotnet.yml index b8b2398..41fedbc 100644 --- a/.github/workflows/publish-dotnet.yml +++ b/.github/workflows/publish-dotnet.yml @@ -16,6 +16,10 @@ jobs: echo "match=true" >> $GITHUB_OUTPUT fi - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64, amd64 - name: Publish Dotnet Layer if: steps.dotnet-check-tag.outputs.match == 'true' env: diff --git a/.github/workflows/publish-extension.yml b/.github/workflows/publish-extension.yml index 829e702..19785d0 100644 --- a/.github/workflows/publish-extension.yml +++ b/.github/workflows/publish-extension.yml @@ -22,6 +22,10 @@ jobs: - name: Install publish dependencies if: steps.extension-check-tag.outputs.match == 'true' run: pip install -U awscli + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64, amd64 - name: Publish extension layer if: steps.extension-check-tag.outputs.match == 'true' env: diff --git a/.github/workflows/publish-java.yml b/.github/workflows/publish-java.yml index 4a2c1d9..91d6356 100644 --- a/.github/workflows/publish-java.yml +++ b/.github/workflows/publish-java.yml @@ -42,6 +42,10 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: make publish-${{ matrix.java-version }}-ci + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64, amd64 - name: Publish ECR image for ${{ matrix.java-version }} if: steps.java-check-tag.outputs.match == 'true' env: diff --git a/.github/workflows/publish-node.yml b/.github/workflows/publish-node.yml index d85214d..ed5e006 100644 --- a/.github/workflows/publish-node.yml +++ b/.github/workflows/publish-node.yml @@ -32,6 +32,10 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: make publish-nodejs${{ matrix.node-version }}x-ci + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64, amd64 - name: Publish ECR image for nodejs${{ matrix.node-version }} if: steps.node-check-tag.outputs.match == 'true' env: diff --git a/.github/workflows/publish-python.yml b/.github/workflows/publish-python.yml index 143777f..15e022c 100644 --- a/.github/workflows/publish-python.yml +++ b/.github/workflows/publish-python.yml @@ -22,6 +22,10 @@ jobs: - name: Install python dependencies if: steps.python-check-tag.outputs.match == 'true' run: pip install -U awscli + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64, amd64 - name: Publish Python ${{ matrix.python-version }} layer if: steps.python-check-tag.outputs.match == 'true' env: diff --git a/.github/workflows/publish-ruby.yml b/.github/workflows/publish-ruby.yml index f776e78..543189f 100644 --- a/.github/workflows/publish-ruby.yml +++ b/.github/workflows/publish-ruby.yml @@ -35,6 +35,10 @@ jobs: echo "::set-output name=VERSION::$( echo ${{ matrix.ruby-version }} | sed 's/\.//' )" + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64, amd64 - name: Build and Publish layer if: steps.ruby-check-tag.outputs.match == 'true' env: diff --git a/java/build.gradle b/java/build.gradle index 124bcee..1a82c8b 100644 --- a/java/build.gradle +++ b/java/build.gradle @@ -9,12 +9,13 @@ repositories { dependencies { implementation("io.opentracing:opentracing-util:0.33.0") implementation("com.newrelic.opentracing:newrelic-java-lambda:2.2.3") - implementation("com.newrelic.opentracing:java-aws-lambda:2.1.1") + implementation("com.newrelic.opentracing:java-aws-lambda:2.2.0") implementation("com.amazonaws:aws-lambda-java-events:3.8.0") implementation("com.amazonaws:aws-lambda-java-core:1.2.0") implementation("com.amazonaws:aws-lambda-java-serialization:1.0.0") implementation("com.fasterxml.jackson.core:jackson-databind:2.12.7.1") implementation("com.fasterxml.jackson.datatype:jackson-datatype-joda:2.12.2") + testImplementation("junit:junit:4.13") testImplementation('com.github.stefanbirkner:system-lambda:1.2.0') testImplementation('org.mockito:mockito-core:3.12.4') diff --git a/libBuild.sh b/libBuild.sh index 7aa9500..bb345d4 100644 --- a/libBuild.sh +++ b/libBuild.sh @@ -261,8 +261,12 @@ function publish_docker_ecr { arch=$3 if [[ ${arch} =~ 'arm64' ]]; - then arch_flag="-arm64" - else arch_flag="" + then + arch_flag="-arm64" + platform="linux/arm64" + else + arch_flag="" + platform="linux/amd64" fi version_flag=$(echo "$runtime_name" | sed 's/[^0-9]//g') @@ -302,13 +306,13 @@ function publish_docker_ecr { echo "Running : aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/${repository}" aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/${repository} - echo "docker build -t layer-nr-image-${language_flag}-${version_flag}${arch_flag}:latest \ + echo "docker buildx build --platform ${platform} -t layer-nr-image-${language_flag}-${version_flag}${arch_flag}:latest \ -f Dockerfile.ecrImage \ --build-arg layer_zip=${layer_archive} \ --build-arg file_without_dist=${file_without_dist} \ ." - docker build -t layer-nr-image-${language_flag}-${version_flag}${arch_flag}:latest \ + docker buildx build --platform ${platform} -t layer-nr-image-${language_flag}-${version_flag}${arch_flag}:latest \ -f Dockerfile.ecrImage \ --build-arg layer_zip=${layer_archive} \ --build-arg file_without_dist=${file_without_dist} \