Stage native CLI tool packages deterministically#16631
Stage native CLI tool packages deterministically#16631radical merged 2 commits intomicrosoft:mainfrom
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16631Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16631" |
|
Validating this PR with the internal AzDO pipeline: https://dev.azure.com/dnceng/internal/_build/results?buildId=2964700 |
There was a problem hiding this comment.
Pull request overview
This PR makes native Aspire CLI tool package staging deterministic in the Azure DevOps publishing pipeline by centralizing staging logic in a shared PowerShell script and adding infrastructure tests to validate expected behaviors and failure modes.
Changes:
- Added
eng/scripts/stage-native-cli-tool-packages.ps1to stage exactly one canonicalAspire.Clipointer package plus one RID-specific package per native-archive RID, with validation for duplicates/mismatches. - Updated both official and unofficial Azure DevOps pipelines to invoke the shared staging script instead of inlining staging logic.
- Added
Infrastructure.Testscoverage for the staging script across success and multiple error scenarios.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Infrastructure.Tests/PowerShellScripts/StageNativeCliToolPackagesTests.cs | Adds test coverage for the staging script’s success path and fail-fast validations. |
| eng/scripts/stage-native-cli-tool-packages.ps1 | Implements deterministic package discovery/validation and staging into the Shipping directory. |
| eng/pipelines/azure-pipelines.yml | Switches official pipeline staging step to call the shared script. |
| eng/pipelines/azure-pipelines-unofficial.yml | Switches unofficial pipeline staging step to call the shared script. |
Extract native CLI package staging into a shared PowerShell script so the official and unofficial Azure DevOps pipelines select the canonical pointer package and matching RID-specific packages consistently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add infrastructure tests for the native CLI package staging script across canonical pointer selection, RID matching, duplicate detection, version validation, and custom canonical artifact selection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b38b527 to
7795c52
Compare
|
Updated internal AzDO validation after addressing review feedback: https://dev.azure.com/dnceng/internal/_build/results?buildId=2964869 |
Description
Adds deterministic staging for native Aspire CLI tool packages in the Azure DevOps publishing pipeline.
The pipeline now calls a shared PowerShell script that stages exactly one canonical
Aspire.Clipointer package and one RID-specific package per native archive artifact, while failing fast on missing pointer packages, RID/package mismatches, duplicate RID packages, and version mismatches. Both official and unofficial Azure DevOps pipeline definitions use the same script.Validation:
./restore.sh./build.sh --build /p:SkipNativeBuild=truedotnet test --project tests/Infrastructure.Tests/Infrastructure.Tests.csproj --no-build --no-launch-profile -- --filter-class "*.StageNativeCliToolPackagesTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: