fix: vhd build info card for VHD builds#8626
Open
timmy-wright wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an Azure DevOps build summary “card” for Windows VHD builder pipelines by generating a markdown summary file and uploading it via ##vso[task.uploadsummary], so key build inputs/outputs (source image, build config, produced version, cached images/files) are visible directly in the pipeline UI.
Changes:
- Add a new pipeline step to generate and upload a Windows VHD build summary markdown.
- Introduce a new script that reads
vhdbuilder/packer/settings.json,image-bom.json, andrelease-notes.txtand renders them into a summary table.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.pipelines/templates/.builder-release-template-windows.yaml |
Adds a post-build step to run the summary generator and upload the build summary to ADO. |
.pipelines/scripts/windows_generate_build_summary.sh |
New script that generates build-summary.md from settings/BOM/release notes and uploads it using task.uploadsummary. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
r2k1
approved these changes
Jun 3, 2026
Comment on lines
+140
to
+164
| size_bytes=$(echo "$line" | awk '{print $NF}') | ||
| if [ -z "$fname" ] || [ -z "$size_bytes" ]; then | ||
| continue | ||
| fi | ||
| # validate size_bytes is numeric | ||
| case "$size_bytes" in | ||
| '' | *[!0-9]*) continue ;; | ||
| esac | ||
| file_count=$((file_count + 1)) | ||
| total_bytes=$((total_bytes + size_bytes)) | ||
| # human-readable size | ||
| if [ "$size_bytes" -ge 1073741824 ]; then | ||
| human_size="$(awk "BEGIN {printf \"%.1f GB\", ${size_bytes}/1073741824}")" | ||
| elif [ "$size_bytes" -ge 1048576 ]; then | ||
| human_size="$(awk "BEGIN {printf \"%.1f MB\", ${size_bytes}/1048576}")" | ||
| elif [ "$size_bytes" -ge 1024 ]; then | ||
| human_size="$(awk "BEGIN {printf \"%.1f KB\", ${size_bytes}/1024}")" | ||
| else | ||
| human_size="${size_bytes} B" | ||
| fi | ||
| # shorten path for display | ||
| short_name=$(echo "$fname" | sed 's|c:\\akse-cache\\||' | sed 's|c:/akse-cache/||') | ||
| echo "| \`${short_name}\` | ${human_size} |" | ||
| fi | ||
| done < <(tr -d '\r' <"$RELEASE_NOTES_FILE") |
Comment on lines
+2
to
+3
| # Generates a markdown build summary card for Windows VHD builds. | ||
| # Uploaded via ##vso[task.uploadsummary] to appear as an extension tab in ADO. |
Comment on lines
593
to
597
| switch getCloudTargetEnv(v) { | ||
| case "AzureUSGovernmentCloud": | ||
| case helpers.AzureUSGovernmentCloud: | ||
| return "https://management.usgovcloudapi.net/" | ||
| case "AzureChinaCloud": | ||
| case helpers.AzureChinaCloud: | ||
| return "https://management.chinacloudapi.cn/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an extension card with VHD build info
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #