[devops] Remove empty directories and extract archive-html-report template#25250
[devops] Remove empty directories and extract archive-html-report template#25250rolfbjarne wants to merge 3 commits intomainfrom
Conversation
Empty directories in jenkins-results add noise to the HtmlReport.zip archives. Remove them before the ArchiveFiles task runs. - tests/run-tests.yml and mac/build.yml: use find -empty -delete (bash/macOS) - windows/build.yml: use PowerShell equivalent Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The remove-empty-dirs + archive + publish steps for the HTML report were duplicated across tests/run-tests.yml, mac/build.yml, and windows/build.yml. Extract them into common/archive-html-report.yml with rootFolder and artifactName parameters. Uses pwsh (cross-platform) for the empty directory removal. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR extracts the repeated “clean empty directories → archive HtmlReport → publish artifact” steps into a shared Azure Pipelines template to reduce duplication across build/test pipelines.
Changes:
- Added a reusable template
templates/common/archive-html-report.ymlparameterized byrootFolderandartifactName. - Updated Windows, macOS, and tests pipeline templates to call the shared HtmlReport archiving template instead of duplicating the tasks.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/devops/automation/templates/windows/build.yml | Replaces inline HtmlReport archive/publish steps with a reference to the shared template. |
| tools/devops/automation/templates/tests/run-tests.yml | Replaces inline HtmlReport archive/publish steps with a reference to the shared template. |
| tools/devops/automation/templates/mac/build.yml | Replaces inline HtmlReport archive/publish steps with a reference to the shared template. |
| tools/devops/automation/templates/common/archive-html-report.yml | Introduces shared steps to remove empty directories, archive the HtmlReport, and publish it as an artifact. |
✅ [PR Build #cc51f4a] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #cc51f4a] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #cc51f4a] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #cc51f4a] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Extract the duplicated HTML report archiving steps (remove empty dirs → archive → publish artifact) into a shared template
common/archive-html-report.yml.Changes
templates/common/archive-html-report.yml— shared template withrootFolderandartifactNameparameters. Uses cross-platformpwshto remove empty directories before archiving.tests/run-tests.yml,mac/build.yml,windows/build.yml— replaced ~25 lines each with a 4-line template reference.