Streamlines Playwright report merging in Docker

Removes unnecessary directory listing commands from the Docker container execution within the Playwright test job.

This change simplifies the execution and reduces the noise in the job logs, focusing on the core report merging process. The execution also uses semicolons instead of newlines to separate commands.
This commit is contained in:
maguire-arman 2025-07-10 13:39:19 -04:00
parent 6626e7dc58
commit 0b71f997ca

View file

@ -246,32 +246,20 @@ jobs:
echo "Extracted JIRA Card number: '$JIRA_CARD_NUMBER'"
export PLAYWRIGHT_PATH="${{ parameters.playwrightTestsPath }}"
echo "📁 Current directory: $(pwd)"
echo "📂 Contents of current directory:"
ls -al
echo "📂 Contents of playwright-tests directory:"
ls -al $PLAYWRIGHT_PATH
echo "📂 Contents of ./ortoni-report (if exists):"
ls -al ./ortoni-report || echo "No ortoni-report directory found"
echo "📂 Contents of /app/test-results (if mounted later):"
ls -al ./test-results || echo "No /app/test-results directory found"
container_id=$(docker create \
--ipc=host \
--env-file "${{ parameters.envFileName }}" \
-e JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" \
${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \
echo 'Moving Playwright reports out of subfolders...' \
echo 'Moving Playwright reports out of subfolders...'; \
find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; \
echo 'Merging reports...' \
PLAYWRIGHT_JUNIT_OUTPUT_DIR='/app/test-results' PLAYWRIGHT_JUNIT_OUTPUT_NAME='junit_results.xml' npx --prefix $PLAYWRIGHT_PATH playwright merge-reports ./playwright-reports \
echo 'Contents of ortoni-report:' && ls ./ortoni-report \
echo 'Current dir: ' && pwd \
echo 'Contents of current dir: ' && ls \
echo 'Contents of /app/test-results' && ls /app/test-results \
echo 'Merging reports...'; \
PLAYWRIGHT_JUNIT_OUTPUT_DIR='/app/test-results' PLAYWRIGHT_JUNIT_OUTPUT_NAME='junit_results.xml' npx --prefix $PLAYWRIGHT_PATH playwright merge-reports ./playwright-reports; \
echo 'Contents of ortoni-report:' && ls ./ortoni-report; \
echo 'Current dir: ' && pwd; \
echo 'Contents of current dir: ' && ls; \
echo 'Contents of /app/test-results' && ls /app/test-results; \
)
# Start container and stream logs
echo "Starting merge"