diff --git a/Dockerfile.playwright b/Dockerfile.playwright index 0e3543e68..0f5f6af3e 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -1,5 +1,3 @@ -FROM node:20 - FROM mcr.microsoft.com/playwright:v1.48.0-noble # Set the working directory in the container diff --git a/temp/playwright-test.yml b/temp/playwright-test.yml index f0984bfb8..53e8d296a 100644 --- a/temp/playwright-test.yml +++ b/temp/playwright-test.yml @@ -162,7 +162,6 @@ jobs: TOTAL_SHARDS=${{ parameters.totalShards }} container_id=$(docker create \ --ipc=host \ - --env CI=true \ --env-file "${{ parameters.envFileName }}" \ ${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \ npx concurrently -k -n 'server,playwright' \ @@ -177,12 +176,17 @@ jobs: export SERVE_PATH="${{ parameters.npmServePath }}" export SHARD_NUMBER=$(shardNumber) export TOTAL_SHARDS=${{ parameters.totalShards }} + export ENV_FILE="${{ parameters.envFileName }}" container_id=$(docker create \ --ipc=host \ - --env CI=true \ --env-file "${{ parameters.envFileName }}" \ ${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \ - bash -c "PLAYWRIGHT_BLOB_OUTPUT_DIR='/app/blob-report' npx --prefix $PLAYWRIGHT_PATH playwright test $PLAYWRIGHT_PATH --config=$PLAYWRIGHT_PATH/playwright.config.ts --shard=$SHARD_NUMBER/$TOTAL_SHARDS --reporter=list,blob $FILTER" \ + bash -c " + set -a + source $ENV_FILE + set +a + PLAYWRIGHT_BLOB_OUTPUT_DIR='/app/blob-report' npx --prefix $PLAYWRIGHT_PATH playwright test $PLAYWRIGHT_PATH --config=$PLAYWRIGHT_PATH/playwright.config.ts --shard=$SHARD_NUMBER/$TOTAL_SHARDS --reporter=list,blob $FILTER + " \ ) fi # Start container and stream logs @@ -250,12 +254,15 @@ jobs: export JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" + export ENV_FILE="${{ parameters.envFileName }}" container_id=$(docker create \ --ipc=host \ - --env CI=true \ --env-file "${{ parameters.envFileName }}" \ ${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \ bash -c " + set -a + source $ENV_FILE + set +a echo 'Moving Playwright reports out of subfolders...' find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; echo 'Value of JIRA_CARD_NUMBER in bash -c command: $JIRA_CARD_NUMBER'