-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Bug fix and improvement to aggregate reports pipeline #25503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chidozieononiwu
merged 7 commits into
Azure:main
from
chidozieononiwu:ImproveAggreagteReport
Dec 10, 2021
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
29e8be9
Bug fix and improvement to aggregate reports pipeline
chidozieononiwu 6130b8b
Build all packages
chidozieononiwu 35b3c01
Add script for download packages from artifacts dev feed
chidozieononiwu e36788b
Update dependency graph
chidozieononiwu d064da4
Use alpha versions when downloading nuget files from DevOps feed
chidozieononiwu e7bdb5a
Use alpha versions where available, else use latest dev version
chidozieononiwu cc73baa
Switch to using Install-Package
chidozieononiwu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| param ( | ||
| [Parameter(Mandatory=$True)] | ||
| [string] $WorkingDirectory, | ||
| [Parameter(Mandatory=$True)] | ||
| [string] $NupkgFilesDestination, | ||
| # Install-Package requires a v2 nuget feed. | ||
| [string] $NugetSource="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v2", | ||
| [string] $FeedId="azure-sdk-for-net" | ||
| ) | ||
|
|
||
| . (Join-Path $PSScriptRoot ".." common scripts common.ps1) | ||
|
|
||
| $allPackages = Get-AllPkgProperties | ||
| $trackTwoPackages = $allPackages.Where({ $_.IsNewSdk }) | ||
|
|
||
| Write-Host "Number of track two packages $($trackTwoPackages.Count)" | ||
|
|
||
| Push-Location $WorkingDirectory | ||
| $nugetPackagesPath = Join-Path $WorkingDirectory nugetPackages | ||
| New-Item -Path $WorkingDirectory -Type "directory" -Name "nugetPackages" | ||
|
|
||
|
|
||
| foreach ($package in $trackTwoPackages) | ||
| { | ||
| $packageVersion = [AzureEngSemanticVersion]::ParseVersionString($package.Version) | ||
| $packageVersion.IsPreRelease = $false # Clear prerelease so ToString strips it prerelease label. | ||
| $packageVersionBase = $packageVersion.ToString() | ||
|
|
||
| # To workaround some older invalid packages (i.e. Iot->IoT renamed packages) start the alpha version range to start at 6/21 | ||
| $installedPackage = Install-Package -Name $package.Name ` | ||
| -Source $NugetSource ` | ||
| -AllowPrereleaseVersions ` | ||
| -MinimumVersion "$packageVersionBase-alpha.202106" ` | ||
| -MaximumVersion "$packageVersionBase-alphab" ` | ||
| -Destination $nugetPackagesPath ` | ||
| -Force ` | ||
| -SkipDependencies ` | ||
| -ErrorAction Ignore | ||
|
|
||
| if ($installedPackage) | ||
| { | ||
| Write-Host "Installed $($installedPackage.Name) $($installedPackage.Version)" | ||
| } | ||
| else | ||
| { | ||
| # Install the latest available version if no alpha version is found | ||
| $latestInstalledPackage = Install-Package -Name $package.Name ` | ||
| -Source $NugetSource ` | ||
| -AllowPrereleaseVersions ` | ||
| -Destination $nugetPackagesPath ` | ||
| -Force ` | ||
| -SkipDependencies ` | ||
| -ErrorAction Ignore | ||
|
|
||
| if ($latestInstalledPackage) | ||
| { | ||
| Write-Host "Installed latest version $($latestInstalledPackage.Name) $($latestInstalledPackage.Version)" | ||
| } | ||
| else | ||
| { | ||
| Write-Host "Did not find any matching package $($package.Name)" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| $nupkgDirPath = Join-Path $WorkingDirectory $NupkgFilesDestination | ||
| New-Item -Path $WorkingDirectory -Type "directory" -Name $NupkgFilesDestination | ||
|
|
||
| Get-ChildItem -Path $nugetPackagesPath -Include *.nupkg -Recurse | Copy-Item -Destination $nupkgDirPath |
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.