forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix and improvement to aggregate reports pipeline (Azure#25503)
* Bug fix and improvement to aggregate reports pipeline * Build all packages * Add script for download packages from artifacts dev feed * Update dependency graph * Use alpha versions when downloading nuget files from DevOps feed * Use alpha versions where available, else use latest dev version * Switch to using Install-Package
- Loading branch information
1 parent
c8ab8d8
commit e923f2d
Showing
7 changed files
with
120 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -158,7 +158,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m | |
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ | ||
[coc_contact]: mailto:[email protected] | ||
<!--[package]: https://www.nuget.org/packages/Azure.Communication.PhoneNumbers--> | ||
[phone_numbers]: https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/get-phone-number?pivots=programming-language-csharp | ||
[phone_numbers]: https://docs.microsoft.com/azure/communication-services/quickstarts/telephony/get-phone-number?pivots=platform-azp | ||
[product_docs]: https://docs.microsoft.com/azure/communication-services/overview | ||
[nuget]: https://www.nuget.org/ | ||
[communication_resource_docs]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp | ||
|