Skip to content

fix: vhd build info card for VHD builds#8626

Open
timmy-wright wants to merge 7 commits into
mainfrom
timmy/vhd-build-info
Open

fix: vhd build info card for VHD builds#8626
timmy-wright wants to merge 7 commits into
mainfrom
timmy/vhd-build-info

Conversation

@timmy-wright
Copy link
Copy Markdown
Contributor

Adds an extension card with VHD build info

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

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 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, and release-notes.txt and 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.

Comment thread .pipelines/scripts/windows_generate_build_summary.sh Outdated
Comment thread .pipelines/scripts/windows_generate_build_summary.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 3, 2026 00:13
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings June 3, 2026 00:29
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread .pipelines/scripts/windows_generate_build_summary.sh Outdated
Comment thread aks-node-controller/parser/helper.go
Copilot AI review requested due to automatic review settings June 3, 2026 02:23
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

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/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants