From b9ffb7501ec0b371009589a7d4ae98e777a5792d Mon Sep 17 00:00:00 2001 From: Dina Hafez Date: Fri, 10 Jan 2025 12:34:31 +0000 Subject: [PATCH] Add an error message if we can't pull DCR container image (#1736) * Add an error message if we can't pull DCR container image * Add continue on error to capture exitcode and next step * Update the error message Co-authored-by: Ravi <7014230+arelra@users.noreply.github.com> --------- Co-authored-by: Ravi <7014230+arelra@users.noreply.github.com> --- .github/workflows/e2e-playwright.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/e2e-playwright.yml b/.github/workflows/e2e-playwright.yml index 9a489fb53..7780810c6 100644 --- a/.github/workflows/e2e-playwright.yml +++ b/.github/workflows/e2e-playwright.yml @@ -53,6 +53,8 @@ jobs: # This makes the commercial dev server available from inside the container # Note that GHA provides a service container feature, but it does not support this argument - name: Start DCR in a container + id: start-dcr-container + continue-on-error: true run: | /usr/bin/docker run -d \ --network host \ @@ -60,6 +62,11 @@ jobs: -e "PORT=3030" \ -e "COMMERCIAL_BUNDLE_URL=http://localhost:3031/graun.standalone.commercial.js" \ ghcr.io/guardian/dotcom-rendering:main + echo "exitcode=$?" >> $GITHUB_OUTPUT + + - name: Start DCR in a container step failed + if: ${{ failure() && steps.start-dcr-container.conclusion == 'failure' && steps.start-dcr-container.outputs.exitcode == 125 }} + run: echo "Unable to fetch a DCR container image from the registry. Run the DCR main build in order to create a new container image." && exit 1 - name: Install Playwright Browsers run: pnpm playwright install --with-deps chromium