[release/13.1] Add installer publishing updates for 13.1.3#15158
[release/13.1] Add installer publishing updates for 13.1.3#15158joperezr merged 3 commits intorelease/13.1from
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15158Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15158" |
There was a problem hiding this comment.
Pull request overview
Ports installer publishing (WinGet + Homebrew) and related release-pipeline plumbing into the release/13.1 branch while updating stable pins to 13.1.3.
Changes:
- Bumps pinned Aspire package versions used in repo testing from
13.1.2→13.1.3. - Adds WinGet manifest templates + generation/dogfood scripts and pipeline templates for preparing/submitting manifests.
- Adds Homebrew cask templates + generation/dogfood scripts and pipeline templates for preparing/submitting casks; restores darc runtime setup needed by release publishing.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Shared/RepoTesting/Directory.Packages.Helix.props | Updates helix test package pins to 13.1.3. |
| tests/Shared/RepoTesting/Aspire.RepoTesting.targets | Updates AppHost SDK import version to 13.1.3 for out-of-repo tests. |
| eng/winget/microsoft.aspire/Aspire.yaml.template | Adds stable WinGet version manifest template. |
| eng/winget/microsoft.aspire/Aspire.locale.en-US.yaml.template | Adds stable WinGet locale manifest template. |
| eng/winget/microsoft.aspire/Aspire.installer.yaml.template | Adds stable WinGet installer manifest template. |
| eng/winget/microsoft.aspire.prerelease/Aspire.yaml.template | Adds prerelease WinGet version manifest template. |
| eng/winget/microsoft.aspire.prerelease/Aspire.locale.en-US.yaml.template | Adds prerelease WinGet locale manifest template. |
| eng/winget/microsoft.aspire.prerelease/Aspire.installer.yaml.template | Adds prerelease WinGet installer manifest template. |
| eng/winget/generate-manifests.ps1 | New script to generate WinGet manifests and compute SHA256s. |
| eng/winget/dogfood.ps1 | New script to install/uninstall from local WinGet manifests for testing. |
| eng/winget/README.md | Documents WinGet manifest generation/testing/publishing flow. |
| eng/pipelines/templates/publish-winget.yml | Adds pipeline template to validate and submit WinGet manifests via wingetcreate. |
| eng/pipelines/templates/publish-homebrew.yml | Adds pipeline template to validate URLs and submit Homebrew PR via gh. |
| eng/pipelines/templates/prepare-winget-manifest.yml | Adds pipeline template to generate/validate/test WinGet manifests and publish artifacts. |
| eng/pipelines/templates/prepare-homebrew-cask.yml | Adds pipeline template to generate/audit/test Homebrew cask and publish artifacts. |
| eng/pipelines/release-publish-nuget.yml | Extends release pipeline to submit WinGet/Homebrew updates after NuGet + promotion. |
| eng/pipelines/azure-pipelines.yml | Adds installer preparation stage; derives installer version/channel for publishing. |
| eng/pipelines/azure-pipelines-unofficial.yml | Adds installer preparation stage for unofficial pipeline with local archive hashing. |
| eng/homebrew/generate-cask.sh | New script to generate Homebrew cask with SHA256s. |
| eng/homebrew/dogfood.sh | New script to dogfood a locally generated Homebrew cask. |
| eng/homebrew/aspire@prerelease.rb.template | Adds prerelease cask template. |
| eng/homebrew/aspire.rb.template | Adds stable cask template. |
| eng/homebrew/README.md | Documents Homebrew cask generation/testing/publishing flow. |
| eng/common/post-build/publish-using-darc.ps1 | Adds parameters to support runtime feed configuration for darc publishing. |
| eng/common/core-templates/post-build/post-build.yml | Restores internal runtime setup before darc publish; passes runtime feed args. |
| eng/common/core-templates/job/publish-build-assets.yml | Ensures .NET 8 is installed for darc and passes runtime feed args. |
| eng/Versions.props | Bumps repo PatchVersion to 13.1.3. |
| $tempFile = [System.IO.Path]::GetTempFileName() | ||
| try { | ||
| $ProgressPreference = 'SilentlyContinue' | ||
| Invoke-WebRequest -Uri $Url -OutFile $tempFile -UseBasicParsing -TimeoutSec 120 |
There was a problem hiding this comment.
-UseBasicParsing is not supported in PowerShell 7+ (pwsh) and will cause parameter-binding failures. Since this script is invoked from pwsh in the pipeline, remove -UseBasicParsing (or add a version-aware fallback that only supplies it on Windows PowerShell 5.1).
| Invoke-WebRequest -Uri $Url -OutFile $tempFile -UseBasicParsing -TimeoutSec 120 | |
| Invoke-WebRequest -Uri $Url -OutFile $tempFile -TimeoutSec 120 |
| foreach ($entry in $installerEntries) { | ||
| Write-Host " Checking: $($entry.Url)" | ||
| try { | ||
| $response = Invoke-WebRequest -Uri $entry.Url -Method Head -UseBasicParsing -TimeoutSec 30 |
There was a problem hiding this comment.
-UseBasicParsing is not supported in PowerShell 7+ (pwsh) and will cause parameter-binding failures. Since this script is invoked from pwsh in the pipeline, remove -UseBasicParsing (or add a version-aware fallback that only supplies it on Windows PowerShell 5.1).
| $response = Invoke-WebRequest -Uri $entry.Url -Method Head -UseBasicParsing -TimeoutSec 30 | |
| $response = Invoke-WebRequest -Uri $entry.Url -Method Head -TimeoutSec 30 |
| tmpfile="$(mktemp)" | ||
| trap 'rm -f "$tmpfile"' RETURN | ||
|
|
||
| curl -fsSL "$url" -o "$tmpfile" | ||
| local hash | ||
| hash="$(shasum -a 256 "$tmpfile" | awk '{print $1}')" | ||
| echo " SHA256: $hash" >&2 | ||
| echo "$hash" |
There was a problem hiding this comment.
The trap ... RETURN is set globally and persists after the function returns; with set -u, subsequent RETURN trap executions can fail because $tmpfile is a local variable that becomes unset. Prefer explicit cleanup (rm -f) before returning, or set/clear the RETURN trap within a subshell or restore the previous trap handler before exiting the function.
| Write-Host "Downloading wingetcreate..." | ||
| Invoke-WebRequest -Uri "https://aka.ms/wingetcreate/latest" -OutFile "$(Build.StagingDirectory)/wingetcreate.exe" | ||
| Write-Host "wingetcreate downloaded successfully" |
There was a problem hiding this comment.
This Invoke-WebRequest call runs under the powershell task (typically Windows PowerShell 5.1), where omitting -UseBasicParsing can fail on agents without the IE engine. Align with the other URL validation calls in this template by adding -UseBasicParsing (and consider a timeout/retry) to reduce flakiness when downloading wingetcreate.
| Write-Host "Downloading wingetcreate..." | |
| Invoke-WebRequest -Uri "https://aka.ms/wingetcreate/latest" -OutFile "$(Build.StagingDirectory)/wingetcreate.exe" | |
| Write-Host "wingetcreate downloaded successfully" | |
| $wingetCreateUrl = "https://aka.ms/wingetcreate/latest" | |
| $wingetCreatePath = "$(Build.StagingDirectory)/wingetcreate.exe" | |
| Write-Host "Downloading wingetcreate from $wingetCreateUrl to $wingetCreatePath..." | |
| $maxAttempts = 3 | |
| $attempt = 0 | |
| $lastError = $null | |
| while ($attempt -lt $maxAttempts) { | |
| $attempt++ | |
| Write-Host "Attempt $attempt of $maxAttempts..." | |
| try { | |
| Invoke-WebRequest -Uri $wingetCreateUrl -OutFile $wingetCreatePath -UseBasicParsing -TimeoutSec 30 | |
| Write-Host "wingetcreate downloaded successfully on attempt $attempt" | |
| $lastError = $null | |
| break | |
| } | |
| catch { | |
| $lastError = $_ | |
| Write-Warning "Failed to download wingetcreate on attempt $attempt: $($_.Exception.Message)" | |
| if ($attempt -lt $maxAttempts) { | |
| Write-Host "Waiting 5 seconds before retrying..." | |
| Start-Sleep -Seconds 5 | |
| } | |
| } | |
| } | |
| if ($lastError) { | |
| Write-Error "Failed to download wingetcreate after $maxAttempts attempts: $($lastError.Exception.Message)" | |
| exit 1 | |
| } |
| if (-not $ManifestPath) { | ||
| # Look for versioned manifest directories under the script directory | ||
| # Convention: manifests/m/Microsoft/Aspire/{Version}/ or manifests/m/Microsoft/Aspire/Prerelease/{Version}/ | ||
| $candidates = Get-ChildItem -Path $ScriptDir -Directory -Recurse -Depth 6 | |
There was a problem hiding this comment.
Get-ChildItem -Depth is not available in Windows PowerShell 5.1; if users run this dogfood script with powershell.exe, it can fail at parameter binding. Either remove -Depth (and accept full recursion under $ScriptDir), implement a manual depth limit, or add a #requires -Version 7.0 header to make the PowerShell 7 requirement explicit.
|
@joperezr this is ready for merging, and then testing. |
12fa9ed to
bd8fb9f
Compare
|
The transient CI rerun workflow requested reruns for the following jobs after analyzing the failed attempt.
|
Updated [Aspire.Hosting.PostgreSQL](https://github.com/dotnet/aspire) from 13.1.2 to 13.1.3. <details> <summary>Release notes</summary> _Sourced from [Aspire.Hosting.PostgreSQL's releases](https://github.com/dotnet/aspire/releases)._ ## 13.1.3 ## What's Changed * [release/13.1] Add installer publishing updates for 13.1.3 by @radical in microsoft/aspire#15158 **Full Changelog**: microsoft/aspire@v13.1.2...v13.1.3 Commits viewable in [compare view](microsoft/aspire@v13.1.2...v13.1.3). </details> Updated [Aspire.Hosting.Redis](https://github.com/dotnet/aspire) from 13.1.2 to 13.1.3. <details> <summary>Release notes</summary> _Sourced from [Aspire.Hosting.Redis's releases](https://github.com/dotnet/aspire/releases)._ ## 13.1.3 ## What's Changed * [release/13.1] Add installer publishing updates for 13.1.3 by @radical in microsoft/aspire#15158 **Full Changelog**: microsoft/aspire@v13.1.2...v13.1.3 Commits viewable in [compare view](microsoft/aspire@v13.1.2...v13.1.3). </details> Updated [Aspire.StackExchange.Redis.DistributedCaching](https://github.com/dotnet/aspire) from 13.1.2 to 13.1.3. <details> <summary>Release notes</summary> _Sourced from [Aspire.StackExchange.Redis.DistributedCaching's releases](https://github.com/dotnet/aspire/releases)._ ## 13.1.3 ## What's Changed * [release/13.1] Add installer publishing updates for 13.1.3 by @radical in microsoft/aspire#15158 **Full Changelog**: microsoft/aspire@v13.1.2...v13.1.3 Commits viewable in [compare view](microsoft/aspire@v13.1.2...v13.1.3). </details> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details>
Summary
release/13.113.1.3Validation
git diff --check -- eng/common/post-build/publish-using-darc.ps1 eng/common/core-templates/post-build/post-build.yml eng/common/core-templates/job/publish-build-assets.ymlgit diff --check -- eng/Versions.props tests/Shared/RepoTesting/Aspire.RepoTesting.targets tests/Shared/RepoTesting/Directory.Packages.Helix.propsgit diff --check -- eng/pipelines/azure-pipelines.yml eng/pipelines/azure-pipelines-unofficial.yml