diff --git a/.github/workflows/pr-check.yaml b/.github/workflows/pr-check.yaml index ca1dd2c3..183a5688 100644 --- a/.github/workflows/pr-check.yaml +++ b/.github/workflows/pr-check.yaml @@ -202,21 +202,24 @@ jobs: # allow unprivileged user namespace sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 - - name: Build OpenShift Local extension from container file (Ubuntu, podman) + - name: Build OpenShift Local extension from container file and SSO dependency (Ubuntu, podman) if: matrix.os == 'ubuntu-24.04' working-directory: ./crc-extension run: | + # build crc extension podman build -t openshift_local_image . -f ./oci/Containerfile.multistage CONTAINER_ID_CRC=$(podman create localhost/openshift_local_image --entrypoint "") podman export $CONTAINER_ID_CRC > /tmp/openshift_local_extension.tar - mkdir -p tests/playwright/output/crc-tests-pd/plugins + + # build sso extension podman pull ghcr.io/redhat-developer/podman-desktop-redhat-account-ext:latest CONTAINER_ID_SSO=$(podman create ghcr.io/redhat-developer/podman-desktop-redhat-account-ext --entrypoint "") podman export $CONTAINER_ID_SSO > /tmp/sso_extension.tar + + # move extension files to expected locations + mkdir -p tests/playwright/output/crc-tests-pd/plugins tar -xf /tmp/openshift_local_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/crcextension - # does this output match the one from the locally built version? - ls -l tests/playwright/output/crc-tests-pd/plugins/crcextension 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 @@ -230,35 +233,16 @@ jobs: # put the contents into its expected folder: New-Item -ItemType Directory -Path tests\playwright\output\crc-tests-pd\plugins -Force Expand-Archive -Path "$(pwd)\openshift-local.cdix" -DestinationPath ".\tests\playwright\output\crc-tests-pd\plugins\crcextension" - # does this output match the one from the containerfile built version? - Get-ChildItem -Path "$(pwd)\tests\playwright\output\crc-tests-pd\plugins\crcextension" - # build sso dependency from containerfile: - #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\ - #Move-Item tests\playwright\output\crc-tests-pd\plugins\extension\ tests\playwright\output\crc-tests-pd\plugins\ssoextension - - - name: Build SSO extension locally (Windows, docker) #from container file is not available yet + - name: Build SSO extension (crc dependency) locally (Windows, docker) #from container file is not available yet if: matrix.os == 'windows-2022' working-directory: ./sso-extension shell: pwsh run: | # generate 'redhat-authentication.cdix': pnpm build - # put the contents into its expected folder: - #New-Item -ItemType Directory -Path tests\playwright\output\crc-tests-pd\plugins -Force + # put the contents into its expected folder (parent folder created in previous step): Expand-Archive -Path "$(pwd)\redhat-authentication.cdix" -DestinationPath ".\tests\playwright\output\crc-tests-pd\plugins\ssoextension" - # does this output match the one from the containerfile built version? - Get-ChildItem -Path "$(pwd)\tests\playwright\output\crc-tests-pd\plugins\ssoextension" - - # build sso dependency from containerfile: - #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\ - #Move-Item tests\playwright\output\crc-tests-pd\plugins\extension\ tests\playwright\output\crc-tests-pd\plugins\ssoextension - name: Run All E2E tests working-directory: ./crc-extension @@ -269,5 +253,5 @@ jobs: - uses: actions/upload-artifact@v4 if: always() with: - name: e2e-tests + name: e2e-tests-${{ matrix.os }} path: ./**/tests/**/output/