Merge branch 'release/2.1' into release/2.2

This commit is contained in:
Nate McMaster 2019-06-04 17:04:10 -07:00
commit f9ef0abcf8
No known key found for this signature in database
GPG Key ID: A778D9601BD78810
10 changed files with 62 additions and 33 deletions

View File

@ -1346,4 +1346,4 @@
<BaselinePackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="[2.2.0, )" /> <BaselinePackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="[2.2.0, )" />
<BaselinePackageReference Include="Microsoft.Owin.Security" Version="[3.0.1, )" /> <BaselinePackageReference Include="Microsoft.Owin.Security" Version="[3.0.1, )" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,4 @@
<!-- <!--
This file contains a list of all the packages and their versions which were released in the last servicing This file contains a list of all the packages and their versions which were released in the last servicing
build of ASP.NET Core 2.2.x. Update this list when preparing for a new patch. build of ASP.NET Core 2.2.x. Update this list when preparing for a new patch.

View File

@ -71,5 +71,4 @@ Later on, this will be checked using this condition:
Microsoft.AspNetCore.Mvc.Api.Analyzers; Microsoft.AspNetCore.Mvc.Api.Analyzers;
</PackagesInPatch> </PackagesInPatch>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -61,7 +61,11 @@ namespace PackageBaselineGenerator
var sourceRepository = new SourceRepository(packageSource, providers); var sourceRepository = new SourceRepository(packageSource, providers);
if (_update.HasValue()) if (_update.HasValue())
{ {
return await RunUpdateAsync(inputPath, input, sourceRepository); var updateResult = await RunUpdateAsync(inputPath, input, sourceRepository);
if (updateResult != 0)
{
return updateResult;
}
} }
var feedType = await sourceRepository.GetFeedType(CancellationToken.None); var feedType = await sourceRepository.GetFeedType(CancellationToken.None);

View File

@ -8,8 +8,8 @@ Add `--package-source {source}` to the commands below if the packages of interes
### Auto-update ### Auto-update
1. Run `dotnet run --update` in this project folder. Run `dotnet run --update` in this project folder. This will attempt to find the latest patch version of packages and
2. Run `dotnet run` in this project. update the baseline file.
### Manual update ### Manual update

View File

@ -5,6 +5,7 @@ using System;
using System.IO; using System.IO;
using System.IO.Compression; using System.IO.Compression;
using System.Linq; using System.Linq;
using System.Net;
using System.Net.Http; using System.Net.Http;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -21,6 +22,8 @@ Usage: <ZIP> <OUTPUT>
<OUTPUT> The output file path for the ZIP manifest file."); <OUTPUT> The output file path for the ZIP manifest file.");
} }
private const int ZipDoesNotExist = 404;
public static async Task<int> Main(string[] args) public static async Task<int> Main(string[] args)
{ {
if (args.Length != 2) if (args.Length != 2)
@ -42,6 +45,13 @@ Usage: <ZIP> <OUTPUT>
Console.WriteLine($"log: Downloading {url}"); Console.WriteLine($"log: Downloading {url}");
zipPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + ".zip"); zipPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + ".zip");
var response = await new HttpClient().GetAsync(url); var response = await new HttpClient().GetAsync(url);
if (response.StatusCode == HttpStatusCode.NotFound)
{
Console.Error.WriteLine($"Could not find {url}.");
return ZipDoesNotExist;
}
response.EnsureSuccessStatusCode(); response.EnsureSuccessStatusCode();
using (var outStream = File.Create(zipPath)) using (var outStream = File.Create(zipPath))

View File

@ -13,21 +13,10 @@ Usage: <ZIP> <OUTPUT>
Example: dotnet run ./archive.zip files.txt Example: dotnet run ./archive.zip files.txt
``` ```
## Example for servicing updates ## Servicing updates
To generate a new manifest for the incremental CI server package caches, you would run For convenience, this folder contains [./UpdateBaselines.ps1](./UpdateBaselines.ps1) to update
the baselines from the last patch release.
```ps1 Using version.props to figure out the last version, this script reads the build manifests from https://github.com/dotnet/versions/tree/master/build-info/dotnet/product/cli/release and
$ProdConBuild='20180919-01' invokes the manifest generator
$Version='2.2.1'
$patchUrl = "https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-2/${ProdconBuild}/final/assets/aspnetcore/Runtime/${Version}/nuGetPackagesArchive-ci-server-${Version}.patch.zip"
dotnet run $patchUrl "../Archive.CiServer.Patch/ArchiveBaseline.${Version}.txt"
$compatPatchUrl = "https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-2/${ProdconBuild}/final/assets/aspnetcore/Runtime/${Version}/nuGetPackagesArchive-ci-server-compat-${Version}.patch.zip"
dotnet run $compatPatchUrl "../Archive.CiServer.Patch.Compat/ArchiveBaseline.${Version}.txt"
```
For convenience, this folder contains [./UpdateBaselines.ps1](./UpdateBaselines.ps1) to run these steps.

View File

@ -1,15 +1,40 @@
param( $ErrorActionPreference = 'Stop'
[Parameter(Mandatory = $true)] $ProgressPreference = 'SilentlyContinue'
$ProdConBuildId,
[Parameter(Mandatory = $true)]
$ProductVersion,
$FeedContainer = 'orchestrated-release-2-2'
)
$patchUrl = "https://dotnetfeed.blob.core.windows.net/${FeedContainer}/${ProdconBuildId}/final/assets/aspnetcore/Runtime/${ProductVersion}/nuGetPackagesArchive-ci-server-${ProductVersion}.patch.zip" Push-Location $PSScriptRoot
try {
dotnet run $patchUrl "../Archive.CiServer.Patch/ArchiveBaseline.${ProductVersion}.txt" [xml]$versionProps = Get-Content "$PSScriptRoot/../../../version.props"
$LastVersion = "$($versionProps.Project.PropertyGroup.AspNetCoreMajorVersion).$($versionProps.Project.PropertyGroup.AspNetCoreMinorVersion).$($versionProps.Project.PropertyGroup.AspNetCorePatchVersion - 1)"
$manifestUrl = "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/product/cli/release/$LastVersion/build.xml"
$buildXml = Invoke-RestMethod -Method GET $manifestUrl
$feedUrl = $buildXml.OrchestratedBuild.Endpoint.Url
$baseFeedUrl = $feedUrl -replace 'final/index.json',''
$compatPatchUrl = "https://dotnetfeed.blob.core.windows.net/${FeedContainer}/${ProdconBuildId}/final/assets/aspnetcore/Runtime/${ProductVersion}/nuGetPackagesArchive-ci-server-compat-${ProductVersion}.patch.zip" Write-Host "Last patch version = $LastVersion"
Write-Host "BaseURL = $baseFeedUrl"
dotnet run $compatPatchUrl "../Archive.CiServer.Patch.Compat/ArchiveBaseline.${ProductVersion}.txt" function CreateBaseLineFromZip($url, $filePath) {
dotnet run $url $filePath
if ($lastexitcode -eq 404) {
Write-Host -f Yellow "It appears there was no patch zip in the last release, so creating an empty baseline file in $filePath."
Set-Content -path $filePath ''
}
elseif($lastexitcode -ne 0) {
Write-Error "ZipGenerator failed"
exit 1
}
}
CreateBaseLineFromZip `
"$baseFeedUrl/final/assets/aspnetcore/Runtime/${LastVersion}/nuGetPackagesArchive-ci-server-${LastVersion}.patch.zip" `
"../Archive.CiServer.Patch/ArchiveBaseline.${LastVersion}.txt"
CreateBaseLineFromZip `
"$baseFeedUrl/final/assets/aspnetcore/Runtime/${LastVersion}/nuGetPackagesArchive-ci-server-compat-${LastVersion}.patch.zip" `
"../Archive.CiServer.Patch.Compat/ArchiveBaseline.${LastVersion}.txt"
}
finally {
Pop-Location
}