Fixed to work the previous way

This commit is contained in:
Chase King 2025-02-28 14:52:37 -05:00
parent 7e64e0eee4
commit f246351b83

View file

@ -160,13 +160,15 @@ stages:
bash -c "echo \"Moving Playwright reports out of subfolders...\" &&
find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; &&
echo \"Merging reports...\" &&
npx playwright merge-reports --config=playwright-tests/playwright.config.ts ./playwright-reports
num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' /app/test-results/junit_results.xml | head -n 1)
echo \"Number of test failures: '$num_failures'\"
(($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\"
npx playwright merge-reports --reporter=ortoni-report ./playwright-reports
# npx playwright merge-reports --config=playwright-tests/playwright.config.ts ./playwright-reports
# num_failures=$(sed -n 's/.*failures="\([^"]*\)".*/\1/p' /app/test-results/junit_results.xml | head -n 1)
# echo \"Number of test failures: '$num_failures'\"
# (($num_failures -eq 0)) && jira_message='Playwright tests passed!' || jira_message=\"$num_failures Playwright tests failed.\"
# TODO: Update to include test status message later
echo \"Contents of ortoni-report:\" && ls ./ortoni-report &&
echo \"Writing report to Jira card '$(Build.SourceBranchName)'...\" &&
./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" \"$jira_message\" ")
./devops/scripts/jira_writeback.sh add_comment \"$(Build.SourceBranchName)\" /app/ortoni-report/ortoni-report.html \"AUTOMATED TEST RUN: $(date)\" ")
# Start container and stream logs
echo "Starting merge"
@ -179,7 +181,7 @@ stages:
# Copy test results from container
echo "Copying test results..."
docker cp $container_id:/app/ortoni-report/. $(System.DefaultWorkingDirectory)/ortoni-report
docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory)
# docker cp $container_id:/app/test-results/junit_results.xml $(System.DefaultWorkingDirectory)
# TODO: Update to include junit results if necessary
# Remove container