From 3aa622c8493a671950ff038135c70bc2f5f88c7c Mon Sep 17 00:00:00 2001 From: David Byron Date: Sat, 23 Mar 2024 19:40:01 -0700 Subject: [PATCH] feat(integration): run integration test in pr builds multi-arch with --load doesn't work, so add a separate step using the local platform to make an image available for testing. see https://github.com/docker/buildx/issues/59 --- .github/workflows/pr.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 30003c87c..d6b6e9e1f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -72,4 +72,17 @@ jobs: platforms: linux/amd64,linux/arm64 tags: | "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-java11-ubuntu" - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-ubuntu" \ No newline at end of file + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-ubuntu" + - name: Build local slim container image for testing + uses: docker/build-push-action@v5 + with: + context: . + platforms: local + file: Dockerfile.slim + load: true + tags: | + "${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}" + - name: Test local slim container image + env: + FULL_DOCKER_IMAGE_NAME: "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}" + run: ./gradlew rosco-integration:test