From 76ff1062c1c85360ec82e3290398960798ad0236 Mon Sep 17 00:00:00 2001 From: Daniel Villanueva Date: Wed, 11 Dec 2024 16:44:01 +0100 Subject: [PATCH] test(e2e): add buildx to use linux images on windows Signed-off-by: Daniel Villanueva --- .github/workflows/pr-check.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml index b4f2cbf..4329436 100644 --- a/.github/workflows/pr-check.yaml +++ b/.github/workflows/pr-check.yaml @@ -190,7 +190,7 @@ jobs: run: | # allow unprivileged user namespace sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - + - name: Build OpenShift Local extension from container file (Ubuntu, podman) if: matrix.os == 'ubuntu-24.04' working-directory: ./crc-extension @@ -209,6 +209,13 @@ jobs: tar -xf /tmp/sso_extension.tar -C tests/playwright/output/crc-tests-pd/plugins/ mv tests/playwright/output/crc-tests-pd/plugins/extension/ tests/playwright/output/crc-tests-pd/plugins/ssoextension + + - name: Set up Docker Buildx + if: matrix.os == 'windows-2022' + uses: docker/setup-buildx-action@v2 + with: + buildkitd-flags: --debug + - name: Build OpenShift Local extension locally (Windows, docker) #from container file is not available yet if: matrix.os == 'windows-2022' working-directory: ./crc-extension @@ -222,8 +229,14 @@ jobs: # does this output match the one from the containerfile built version? Get-ChildItem -Path "$(pwd)\tests\playwright\output\crc-tests-pd\plugins\crcextension" + docker buildx create --use + docker buildx build --pull --platform linux/amd64 \ + --output type=docker \ + --tag ghcr.io/redhat-developer/podman-desktop-redhat-account-ext:latest \ + . + # build sso dependency from containerfile: - docker pull --platform linux/amd64 ghcr.io/redhat-developer/podman-desktop-redhat-account-ext:latest + #docker pull --platform linux/amd64 ghcr.io/redhat-developer/podman-desktop-redhat-account-ext:latest $CONTAINER_ID_SSO = docker create ghcr.io/redhat-developer/podman-desktop-redhat-account-ext --entrypoint "" docker export $CONTAINER_ID_SSO > C:\temp\sso_extension.tar tar -xf C:\temp\sso_extension.tar -C tests\playwright\output\crc-tests-pd\plugins\