Add NuGet feed management tools and PR package download script#3479
Merged
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Script to move _* packages to archive feed and delete -pr versions - Supports phased migration (CopyOnly, DeleteOnly, All) - Local caching with integrity verification - Resumable with state file - GitHub Action with workflow_dispatch for manual runs - PAT read from AZURE_DEVOPS_PAT environment variable/secret
Contributor
|
Triage Summary No labels will be applied because the issue does not fit any of the available categories and primarily concerns tooling and automation for managing a NuGet feed. This issue is not considered a regression as it does not relate to any prior functionality or performance issues. Additional remarks:
Detailed Summary and ActionsSummary of the triage:
Summary of the actions that will be performed:
This entire triage process was automated by AI and mistakes may have been made. Please let us know so we can continue to improve. |
- parallel-underscore: Run _NativeAssets, _NuGets, _NuGetsPreview, _Symbols, _SymbolsPreview in parallel - parallel-all: Also includes SkiaSharp, HarfBuzzSharp groups in parallel - single: Manual filter for specific packages - PR triggers run underscore packages in dry-run mode
- Wrap Console.KeyAvailable in try/catch for CI environments - Check IsInteractive before keyboard polling - Respect dry_run input in all parallel jobs (was hardcoded to Execute)
This saves significant time/bandwidth for large packages that were already copied.
- Add scripts/get-skiasharp-pr.ps1 for easy PR package downloads - Add nuget_preview artifact to pipeline (smaller, prerelease only) - Update versioning.md with simplified PR package instructions - Update releasing.md with CI feed documentation - No authentication required (public builds)
Since we now check if packages exist in the destination feed before downloading, caching is unnecessary. Packages are now downloaded to a temp directory, pushed immediately, and cleaned up. This fixes disk space issues on CI runners where caching thousands of large packages was filling up the runner.
Since CI runs on fresh images, state file provides no value - packages are already checked against destination feed before download. Removed: - StateFile parameter - Get-State and Save-State functions - All state tracking (CopiedPackages, MovedPackages, DeletedVersions, etc.) - State artifact uploads from workflow The script is now fully stateless and idempotent.
The script now tries in order: 1. Successful completed builds 2. Any completed builds (failed tests but artifacts may be fine) 3. In-progress builds (artifacts may already be published) This allows downloading artifacts even when tests are still running or have failed, since the NuGet packages are typically ready earlier.
- Remove -Filter parameter, always extract prerelease packages (*-*.nupkg) - Always find the latest build by default (regardless of status) - Add -SuccessfulOnly flag to restrict to successful builds only - Suggest -SuccessfulOnly when artifacts aren't available on latest build
- scripts/get-skiasharp-pr.sh - bash equivalent of the PowerShell script - Uses curl/jq/unzip (no gh cli or authentication needed) - Same options: --successful-only, --force, --list, --build-id - Updated docs with bash one-liner and options table
Each _NativeAssets.{platform} package now has its own job:
- _NativeAssets.alpine, alpinenodeps, android, ios, iossimulator
- _NativeAssets.linux, linuxnodeps, maccatalyst, nanoserver, osx
- _NativeAssets.tizen, tvos, uwp, wasm, watchos, windows, winui
This prevents disk space exhaustion from processing all platforms in one job.
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.
Summary
This PR adds tooling for managing Azure DevOps NuGet feeds and downloading PR packages.
Changes
Feed Management Script (
scripts/manage-nuget-feed.ps1)PowerShell script to manage Azure DevOps NuGet feeds:
_*prefixed packages → SkiaSharp-CI archive feed)-pr.*,-preview-*(malformed prerelease tags)-preview.N,-rc.N,-nightly.N,-stable.N,-alpha.N, and stable releasesGitHub Action (
.github/workflows/manage-nuget-feed.yml)Workflow with parallel matrix jobs for efficient processing:
_NativeAssets,_NuGets,_Symbols, etc.)parallel-underscore,parallel-all,singlePR Package Download Script (
scripts/get-skiasharp-pr.ps1)Script for external users to download PR build packages:
Features:
nuget_previewartifact (smaller), falls back to fullnuget-SuccessfulOnlyflag to restrict to successful builds onlyPipeline Updates (
scripts/azure-templates-stages-package.yml)nuget_previewartifact containing only prerelease packages (*-*.nupkg)Documentation Updates
documentation/versioning.md- Updated PR packages section with one-liner usagedocumentation/releasing.md- Added SkiaSharp-CI feed to feeds tableFeed Structure
Testing