Skip to content

[devops] Remove empty directories and extract archive-html-report template#25250

Open
rolfbjarne wants to merge 3 commits intomainfrom
dev/rolf/devops-html-report-no-empty-dirs
Open

[devops] Remove empty directories and extract archive-html-report template#25250
rolfbjarne wants to merge 3 commits intomainfrom
dev/rolf/devops-html-report-no-empty-dirs

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

Extract the duplicated HTML report archiving steps (remove empty dirs → archive → publish artifact) into a shared template common/archive-html-report.yml.

Changes

  • New: templates/common/archive-html-report.yml — shared template with rootFolder and artifactName parameters. Uses cross-platform pwsh to remove empty directories before archiving.
  • Updated: tests/run-tests.yml, mac/build.yml, windows/build.yml — replaced ~25 lines each with a 4-line template reference.

rolfbjarne and others added 2 commits April 27, 2026 14:37
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>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne marked this pull request as ready for review April 29, 2026 08:55
Copilot AI review requested due to automatic review settings April 29, 2026 08:55
@rolfbjarne rolfbjarne enabled auto-merge (squash) April 29, 2026 08:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml parameterized by rootFolder and artifactName.
  • 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.

Comment thread tools/devops/automation/templates/common/archive-html-report.yml
@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #cc51f4a] Build passed (Build packages) ✅

Pipeline on Agent
Hash: cc51f4a00cdb6cf65fd4fd270a91623ef9d315ec [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #cc51f4a] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: cc51f4a00cdb6cf65fd4fd270a91623ef9d315ec [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: cc51f4a00cdb6cf65fd4fd270a91623ef9d315ec [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [CI Build #cc51f4a] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: cc51f4a00cdb6cf65fd4fd270a91623ef9d315ec [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🚀 [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
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 11 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: cc51f4a00cdb6cf65fd4fd270a91623ef9d315ec [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants