From 9a085069d0b36f7b6711f5b9fb41bf5c2d882d19 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2020 15:33:02 +0100 Subject: [PATCH] [master] Update dependencies from dotnet/arcade mono/linker dotnet/runtime-assets (#32484) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Update dependencies from https://github.com/dotnet/runtime-assets build 20200218.1 - System.Windows.Extensions.TestData - 5.0.0-beta.20118.1 - System.Security.Cryptography.X509Certificates.TestData - 5.0.0-beta.20118.1 - System.Private.Runtime.UnicodeData - 5.0.0-beta.20118.1 - System.Net.TestData - 5.0.0-beta.20118.1 - System.IO.Packaging.TestData - 5.0.0-beta.20118.1 - System.IO.Compression.TestData - 5.0.0-beta.20118.1 - System.Drawing.Common.TestData - 5.0.0-beta.20118.1 - System.ComponentModel.TypeConverter.TestData - 5.0.0-beta.20118.1 * Update dependencies from https://github.com/dotnet/arcade build 20200218.1 - Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20118.1 - Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20118.1 - Microsoft.DotNet.ApiCompat - 5.0.0-beta.20118.1 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20118.1 - Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20118.1 - Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20118.1 - Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20118.1 - Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20118.1 - Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20118.1 - Microsoft.DotNet.GenAPI - 5.0.0-beta.20118.1 - Microsoft.DotNet.GenFacades - 5.0.0-beta.20118.1 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20118.1 - Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20118.1 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20118.1 * Update dependencies from https://github.com/dotnet/arcade build 20200219.14 - Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20119.14 - Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20119.14 - Microsoft.DotNet.ApiCompat - 5.0.0-beta.20119.14 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20119.14 - Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20119.14 - Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20119.14 - Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20119.14 - Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20119.14 - Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20119.14 - Microsoft.DotNet.GenAPI - 5.0.0-beta.20119.14 - Microsoft.DotNet.GenFacades - 5.0.0-beta.20119.14 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20119.14 - Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20119.14 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20119.14 * Update dependencies from https://github.com/mono/linker build 20200220.1 - ILLink.Tasks - 0.1.6-prerelease.20120.1 * Update dependencies from https://github.com/dotnet/arcade build 20200220.2 - Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20120.2 - Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20120.2 - Microsoft.DotNet.ApiCompat - 5.0.0-beta.20120.2 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20120.2 - Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20120.2 - Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20120.2 - Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20120.2 - Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20120.2 - Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20120.2 - Microsoft.DotNet.GenAPI - 5.0.0-beta.20120.2 - Microsoft.DotNet.GenFacades - 5.0.0-beta.20120.2 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20120.2 - Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20120.2 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20120.2 * Update dependencies from https://github.com/dotnet/arcade build 20200221.6 - Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20121.6 - Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20121.6 - Microsoft.DotNet.ApiCompat - 5.0.0-beta.20121.6 - Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20121.6 - Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20121.6 - Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20121.6 - Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20121.6 - Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20121.6 - Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20121.6 - Microsoft.DotNet.GenAPI - 5.0.0-beta.20121.6 - Microsoft.DotNet.GenFacades - 5.0.0-beta.20121.6 - Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20121.6 - Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20121.6 - Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20121.6 * Update dependencies from https://github.com/mono/linker build 20200221.2 - ILLink.Tasks - 0.1.6-prerelease.20121.2 * Update dependencies from https://github.com/mono/linker build 20200222.1 - ILLink.Tasks - 0.1.6-prerelease.20122.1 Co-authored-by: Alexander Köplinger --- eng/Version.Details.xml | 87 +++++---- eng/Versions.props | 38 ++-- eng/common/CheckSymbols.ps1 | 159 ----------------- eng/common/PublishToPackageFeed.proj | 83 --------- eng/common/PublishToSymbolServers.proj | 84 --------- eng/common/SourceLinkValidation.ps1 | 195 --------------------- .../post-build/check-channel-consistency.ps1 | 25 +++ .../post-build/channels/generic-public-channel.yml | 4 +- eng/common/templates/post-build/post-build.yml | 58 ++++-- global.json | 8 +- 10 files changed, 140 insertions(+), 601 deletions(-) delete mode 100644 eng/common/CheckSymbols.ps1 delete mode 100644 eng/common/PublishToPackageFeed.proj delete mode 100644 eng/common/PublishToSymbolServers.proj delete mode 100644 eng/common/SourceLinkValidation.ps1 create mode 100644 eng/common/post-build/check-channel-consistency.ps1 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index bc72c12..8f3603c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -6,61 +6,60 @@ - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 - + https://github.com/dotnet/arcade - bd2a2b09716ddb54cb1e40f087beaaeeef859118 + f83aa9749a531bf771a98e5bdace55b31a9bb2b2 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -86,37 +85,37 @@ https://github.com/microsoft/vstest fd0fe3df347a081b56c4da89f85a3e1ff463a4e7 - + https://github.com/dotnet/runtime-assets - 572e952eae1d4fc6e83300031c5f7c401014ff34 + d08f5c335e32348b986440b61c75bce196b96da8 - + https://github.com/dotnet/runtime-assets - 572e952eae1d4fc6e83300031c5f7c401014ff34 + d08f5c335e32348b986440b61c75bce196b96da8 - + https://github.com/dotnet/runtime-assets - 572e952eae1d4fc6e83300031c5f7c401014ff34 + d08f5c335e32348b986440b61c75bce196b96da8 - + https://github.com/dotnet/runtime-assets - 572e952eae1d4fc6e83300031c5f7c401014ff34 + d08f5c335e32348b986440b61c75bce196b96da8 - + https://github.com/dotnet/runtime-assets - 572e952eae1d4fc6e83300031c5f7c401014ff34 + d08f5c335e32348b986440b61c75bce196b96da8 - + https://github.com/dotnet/runtime-assets - 572e952eae1d4fc6e83300031c5f7c401014ff34 + d08f5c335e32348b986440b61c75bce196b96da8 - + https://github.com/dotnet/runtime-assets - 572e952eae1d4fc6e83300031c5f7c401014ff34 + d08f5c335e32348b986440b61c75bce196b96da8 - + https://github.com/dotnet/runtime-assets - 572e952eae1d4fc6e83300031c5f7c401014ff34 + d08f5c335e32348b986440b61c75bce196b96da8 https://github.com/dotnet/llvm-project diff --git a/eng/Versions.props b/eng/Versions.props index 926f5f0..1c7b9f5 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -57,16 +57,16 @@ - 5.0.0-beta.20117.3 - 5.0.0-beta.20117.3 - 5.0.0-beta.20117.3 - 5.0.0-beta.20117.3 - 5.0.0-beta.20117.3 - 5.0.0-beta.20117.3 - 2.5.1-beta.20117.3 - 5.0.0-beta.20117.3 - 5.0.0-beta.20117.3 - 5.0.0-beta.20117.3 + 5.0.0-beta.20121.6 + 5.0.0-beta.20121.6 + 5.0.0-beta.20121.6 + 5.0.0-beta.20121.6 + 5.0.0-beta.20121.6 + 5.0.0-beta.20121.6 + 2.5.1-beta.20121.6 + 5.0.0-beta.20121.6 + 5.0.0-beta.20121.6 + 5.0.0-beta.20121.6 5.0.0-alpha.1.20080.9 5.0.0-alpha.1.20080.9 @@ -79,14 +79,14 @@ 5.0.0-alpha.1.19563.3 - 5.0.0-beta.20105.1 - 5.0.0-beta.20105.1 - 5.0.0-beta.20105.1 - 5.0.0-beta.20105.1 - 5.0.0-beta.20105.1 - 5.0.0-beta.20105.1 - 5.0.0-beta.20105.1 - 5.0.0-beta.20105.1 + 5.0.0-beta.20118.1 + 5.0.0-beta.20118.1 + 5.0.0-beta.20118.1 + 5.0.0-beta.20118.1 + 5.0.0-beta.20118.1 + 5.0.0-beta.20118.1 + 5.0.0-beta.20118.1 + 5.0.0-beta.20118.1 2.2.0-prerelease.19564.1 @@ -120,7 +120,7 @@ 3.1.0-preview-20200129.1 - 0.1.6-prerelease.20117.1 + 0.1.6-prerelease.20122.1 6.0.1-alpha.1.20078.4 6.0.1-alpha.1.20078.4 diff --git a/eng/common/CheckSymbols.ps1 b/eng/common/CheckSymbols.ps1 deleted file mode 100644 index 5442eff..0000000 --- a/eng/common/CheckSymbols.ps1 +++ /dev/null @@ -1,159 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where NuGet packages to be checked are stored - [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation - [Parameter(Mandatory=$true)][string] $SymbolToolPath # Full path to directory where dotnet symbol-tool was installed -) - -Add-Type -AssemblyName System.IO.Compression.FileSystem -. $PSScriptRoot\pipeline-logging-functions.ps1 - -function FirstMatchingSymbolDescriptionOrDefault { - param( - [string] $FullPath, # Full path to the module that has to be checked - [string] $TargetServerParameter, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols - [string] $SymbolsPath - ) - - $FileName = [System.IO.Path]::GetFileName($FullPath) - $Extension = [System.IO.Path]::GetExtension($FullPath) - - # Those below are potential symbol files that the `dotnet symbol` might - # return. Which one will be returned depend on the type of file we are - # checking and which type of file was uploaded. - - # The file itself is returned - $SymbolPath = $SymbolsPath + '\' + $FileName - - # PDB file for the module - $PdbPath = $SymbolPath.Replace($Extension, '.pdb') - - # PDB file for R2R module (created by crossgen) - $NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb') - - # DBG file for a .so library - $SODbg = $SymbolPath.Replace($Extension, '.so.dbg') - - # DWARF file for a .dylib - $DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf') - - .\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParameter $FullPath -o $SymbolsPath | Out-Null - - if (Test-Path $PdbPath) { - return 'PDB' - } - elseif (Test-Path $NGenPdb) { - return 'NGen PDB' - } - elseif (Test-Path $SODbg) { - return 'DBG for SO' - } - elseif (Test-Path $DylibDwarf) { - return 'Dwarf for Dylib' - } - elseif (Test-Path $SymbolPath) { - return 'Module' - } - else { - return $null - } -} - -function CountMissingSymbols { - param( - [string] $PackagePath # Path to a NuGet package - ) - - # Ensure input file exist - if (!(Test-Path $PackagePath)) { - throw "Input file does not exist: $PackagePath" - } - - # Extensions for which we'll look for symbols - $RelevantExtensions = @('.dll', '.exe', '.so', '.dylib') - - # How many files are missing symbol information - $MissingSymbols = 0 - - $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) - $PackageGuid = New-Guid - $ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid - $SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols' - - [System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath) - - # Makes easier to reference `symbol tool` - Push-Location $SymbolToolPath - - Get-ChildItem -Recurse $ExtractPath | - Where-Object {$RelevantExtensions -contains $_.Extension} | - ForEach-Object { - if ($_.FullName -Match '\\ref\\') { - Write-Host "`t Ignoring reference assembly file" $_.FullName - return - } - - $SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--microsoft-symbol-server' -SymbolsPath $SymbolsPath - $SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--internal-server' -SymbolsPath $SymbolsPath - - Write-Host -NoNewLine "`t Checking file" $_.FullName "... " - - if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) { - Write-Host "Symbols found on MSDL (${$SymbolsOnMSDL}) and SymWeb (${$SymbolsOnSymWeb})" - } - else { - $MissingSymbols++ - - if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) { - Write-Host 'No symbols found on MSDL or SymWeb!' - } - else { - if ($SymbolsOnMSDL -eq $null) { - Write-Host 'No symbols found on MSDL!' - } - else { - Write-Host 'No symbols found on SymWeb!' - } - } - } - } - - Pop-Location - - return $MissingSymbols -} - -function CheckSymbolsAvailable { - if (Test-Path $ExtractPath) { - Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue - } - - Get-ChildItem "$InputPath\*.nupkg" | - ForEach-Object { - $FileName = $_.Name - - # These packages from Arcade-Services include some native libraries that - # our current symbol uploader can't handle. Below is a workaround until - # we get issue: https://github.com/dotnet/arcade/issues/2457 sorted. - if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') { - Write-Host "Ignoring Arcade-services file: $FileName" - Write-Host - return - } - elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') { - Write-Host "Ignoring Arcade-services file: $FileName" - Write-Host - return - } - - Write-Host "Validating $FileName " - $Status = CountMissingSymbols "$InputPath\$FileName" - - if ($Status -ne 0) { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName" - } - - Write-Host - } -} - -CheckSymbolsAvailable diff --git a/eng/common/PublishToPackageFeed.proj b/eng/common/PublishToPackageFeed.proj deleted file mode 100644 index a1b1333..0000000 --- a/eng/common/PublishToPackageFeed.proj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - netcoreapp2.1 - - - - - - - - - - - - - - - - - - - - - - - - - https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json - https://dotnetfeed.blob.core.windows.net/arcade-validation/index.json - https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json - https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json - https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json - https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json - https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json - https://dotnetfeed.blob.core.windows.net/dotnet-sdk/index.json - https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json - https://dotnetfeed.blob.core.windows.net/dotnet-toolset/index.json - https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json - https://dotnetfeed.blob.core.windows.net/nuget-nugetclient/index.json - https://dotnetfeed.blob.core.windows.net/aspnet-entityframework6/index.json - https://dotnetfeed.blob.core.windows.net/aspnet-blazor/index.json - - - - - - - - - - - - diff --git a/eng/common/PublishToSymbolServers.proj b/eng/common/PublishToSymbolServers.proj deleted file mode 100644 index 311e2bb..0000000 --- a/eng/common/PublishToSymbolServers.proj +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - netcoreapp2.1 - - - - - - - - - - - - - - - - 3650 - true - true - true - false - - - - - - - - - - - - - - - - - diff --git a/eng/common/SourceLinkValidation.ps1 b/eng/common/SourceLinkValidation.ps1 deleted file mode 100644 index 0e4c349..0000000 --- a/eng/common/SourceLinkValidation.ps1 +++ /dev/null @@ -1,195 +0,0 @@ -param( - [Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored - [Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation - [Parameter(Mandatory=$true)][string] $SourceLinkToolPath, # Full path to directory where dotnet SourceLink CLI was installed - [Parameter(Mandatory=$true)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade - [Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages -) - -function ValidateSourceLinkLinks { - if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) { - Write-PipelineTelemetryError -Category "Build" -Message "GHRepoName should be in the format /" - $global:LASTEXITCODE = 1 - return - } - - if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) { - Write-PipelineTelemetryError -Category "Build" -Message "GHCommit should be a 40 chars hexadecimal string" - $global:LASTEXITCODE = 1 - return - } - - $RepoTreeURL = -Join("https://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1") - $CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript") - - try { - # Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash - $Data = Invoke-WebRequest $RepoTreeURL | ConvertFrom-Json | Select-Object -ExpandProperty tree - - foreach ($file in $Data) { - $Extension = [System.IO.Path]::GetExtension($file.path) - - if ($CodeExtensions.Contains($Extension)) { - $RepoFiles[$file.path] = 1 - } - } - } - catch { - Write-PipelineTelemetryError -Category "Build" -Message "Problems downloading the list of files from the repo. Url used: $RepoTreeURL" - $global:LASTEXITCODE = 1 - return - } - - if (Test-Path $ExtractPath) { - Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue - } - - # Process each NuGet package in parallel - $Jobs = @() - Get-ChildItem "$InputPath\*.symbols.nupkg" | - ForEach-Object { - $Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName - } - - foreach ($Job in $Jobs) { - Wait-Job -Id $Job.Id | Receive-Job - } -} - -try { - . $PSScriptRoot\pipeline-logging-functions.ps1 - - # Cache/HashMap (File -> Exist flag) used to consult whether a file exist - # in the repository at a specific commit point. This is populated by inserting - # all files present in the repo at a specific commit point. - $global:RepoFiles = @{} - - $ValidatePackage = { - param( - [string] $PackagePath # Full path to a Symbols.NuGet package - ) - - # Ensure input file exist - if (!(Test-Path $PackagePath)) { - throw "Input file does not exist: $PackagePath" - } - - # Extensions for which we'll look for SourceLink information - # For now we'll only care about Portable & Embedded PDBs - $RelevantExtensions = @(".dll", ".exe", ".pdb") - - Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... " - - $PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath) - $ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId - $FailedFiles = 0 - - Add-Type -AssemblyName System.IO.Compression.FileSystem - - [System.IO.Directory]::CreateDirectory($ExtractPath); - - $zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath) - - $zip.Entries | - Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} | - ForEach-Object { - $FileName = $_.FullName - $Extension = [System.IO.Path]::GetExtension($_.Name) - $FakeName = -Join((New-Guid), $Extension) - $TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName - - # We ignore resource DLLs - if ($FileName.EndsWith(".resources.dll")) { - return - } - - [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true) - - $ValidateFile = { - param( - [string] $FullPath, # Full path to the module that has to be checked - [string] $RealPath, - [ref] $FailedFiles - ) - - # Makes easier to reference `sourcelink cli` - Push-Location $using:SourceLinkToolPath - - $SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String - - if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) { - $NumFailedLinks = 0 - - # We only care about Http addresses - $Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches - - if ($Matches.Count -ne 0) { - $Matches.Value | - ForEach-Object { - $Link = $_ - $CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/") - $FilePath = $Link.Replace($CommitUrl, "") - $Status = 200 - $Cache = $using:RepoFiles - - if ( !($Cache.ContainsKey($FilePath)) ) { - try { - $Uri = $Link -as [System.URI] - - # Only GitHub links are valid - if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") { - $Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode - } - else { - $Status = 0 - } - } - catch { - $Status = 0 - } - } - - if ($Status -ne 200) { - if ($NumFailedLinks -eq 0) { - if ($FailedFiles.Value -eq 0) { - Write-Host - } - - Write-Host "`tFile $RealPath has broken links:" - } - - Write-Host "`t`tFailed to retrieve $Link" - - $NumFailedLinks++ - } - } - } - - if ($NumFailedLinks -ne 0) { - $FailedFiles.value++ - $global:LASTEXITCODE = 1 - } - } - - Pop-Location - } - - &$ValidateFile $TargetFile $FileName ([ref]$FailedFiles) - } - - $zip.Dispose() - - if ($FailedFiles -eq 0) { - Write-Host "Passed." - } - } - - Measure-Command { ValidateSourceLinkLinks } -} -catch { - Write-Host $_.ScriptStackTrace - Write-PipelineTelemetryError -Category 'SourceLink' -Message $_ - ExitWithExitCode 1 -} - - diff --git a/eng/common/post-build/check-channel-consistency.ps1 b/eng/common/post-build/check-channel-consistency.ps1 new file mode 100644 index 0000000..7e6618d --- /dev/null +++ b/eng/common/post-build/check-channel-consistency.ps1 @@ -0,0 +1,25 @@ +param( + [Parameter(Mandatory=$true)][string] $PromoteToChannels, # List of channels that the build should be promoted to + [Parameter(Mandatory=$true)][array] $AvailableChannelIds # List of channel IDs available in the YAML implementation +) + +try { + . $PSScriptRoot\post-build-utils.ps1 + + # Check that every channel that Maestro told to promote the build to + # is available in YAML + $PromoteToChannelsIds = $PromoteToChannels -split "\D" | Where-Object { $_ } + + foreach ($id in $PromoteToChannelsIds) { + if (($id -ne 0) -and ($id -notin $AvailableChannelIds)) { + Write-PipelineTaskError -Type 'warning' -Message "Channel $id is not present in the post-build YAML configuration!" + } + } + + Write-Host 'done.' +} +catch { + Write-Host $_ + Write-PipelineTelemetryError -Category 'CheckChannelConsistency' -Message "There was an error while trying to check consistency of Maestro default channels for the build and post-build YAML configuration." + ExitWithExitCode 1 +} diff --git a/eng/common/templates/post-build/channels/generic-public-channel.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml index ae8c634..00ef36f 100644 --- a/eng/common/templates/post-build/channels/generic-public-channel.yml +++ b/eng/common/templates/post-build/channels/generic-public-channel.yml @@ -94,6 +94,8 @@ stages: value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - name: AzDOBuildId value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + - name: ArtifactsCategory + value: ${{ coalesce(variables._DotNetArtifactsCategory, '.NETCore') }} condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }})) pool: vmImage: 'windows-2019' @@ -132,7 +134,7 @@ stages: inputs: filePath: eng\common\sdk-task.ps1 arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) + /p:ArtifactsCategory=$(ArtifactsCategory) /p:IsStableBuild=$(IsStableBuild) /p:IsInternalBuild=$(IsInternalBuild) /p:RepositoryName=$(Build.Repository.Name) diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index eff0d9a..05ff356 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -22,6 +22,22 @@ parameters: publishDependsOn: - Validate + # Channel ID's instantiated in this file. + # When adding a new channel implementation the call to `check-channel-consistency.ps1` + # needs to be updated with the new channel ID + NetEngLatestChannelId: 2 + NetEngValidationChannelId: 9 + NetCoreDev5ChannelId: 131 + GeneralTestingChannelId: 529 + NETCoreToolingDevChannelId: 548 + NETCoreToolingReleaseChannelId: 549 + NETInternalToolingChannelId: 551 + NETCoreExperimentalChannelId: 562 + NetEngServicesIntChannelId: 678 + NetEngServicesProdChannelId: 679 + Net5Preview1ChannelId: 737 + Net5Preview2ChannelId: 738 + stages: - stage: Validate dependsOn: ${{ parameters.validateDependsOn }} @@ -32,6 +48,24 @@ stages: - template: setup-maestro-vars.yml - job: + displayName: Post-build Checks + dependsOn: setupMaestroVars + variables: + - name: InitialChannels + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'] ] + - name: PromoteToMaestroChannelId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: PowerShell@2 + displayName: Maestro Channels Consistency + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 + arguments: -PromoteToChannels "$(InitialChannels)[$(PromoteToMaestroChannelId)]" + -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetCoreDev5ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview1ChannelId}},${{parameters.Net5Preview2ChannelId}} + + - job: displayName: NuGet Validation dependsOn: setupMaestroVars condition: eq( ${{ parameters.enableNugetValidation }}, 'true') @@ -165,7 +199,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'NetCore_Dev5_Publish' channelName: '.NET Core 5 Dev' - channelId: 131 + channelId: ${{ parameters.NetCoreDev5ChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' @@ -178,7 +212,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'Net5_Preview1_Publish' channelName: '.NET 5 Preview 1' - channelId: 737 + channelId: ${{ parameters.Net5Preview1ChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' @@ -191,7 +225,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'Net5_Preview2_Publish' channelName: '.NET 5 Preview 2' - channelId: 738 + channelId: ${{ parameters.Net5Preview2ChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' @@ -204,7 +238,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'Net_Eng_Latest_Publish' channelName: '.NET Eng - Latest' - channelId: 2 + channelId: ${{ parameters.NetEngLatestChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' @@ -217,7 +251,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'Net_Eng_Validation_Publish' channelName: '.NET Eng - Validation' - channelId: 9 + channelId: ${{ parameters.NetEngValidationChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' @@ -230,7 +264,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'General_Testing_Publish' channelName: 'General Testing' - channelId: 529 + channelId: ${{ parameters.GeneralTestingChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json' @@ -243,7 +277,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'NETCore_Tooling_Dev_Publishing' channelName: '.NET Core Tooling Dev' - channelId: 548 + channelId: ${{ parameters.NETCoreToolingDevChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' @@ -256,7 +290,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'NETCore_Tooling_Release_Publishing' channelName: '.NET Core Tooling Release' - channelId: 549 + channelId: ${{ parameters.NETCoreToolingReleaseChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' @@ -269,7 +303,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'NET_Internal_Tooling_Publishing' channelName: '.NET Internal Tooling' - channelId: 551 + channelId: ${{ parameters.NETInternalToolingChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal-symbols/nuget/v3/index.json' @@ -282,7 +316,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'NETCore_Experimental_Publishing' channelName: '.NET Core Experimental' - channelId: 562 + channelId: ${{ parameters.NETCoreExperimentalChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json' @@ -295,7 +329,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'Net_Eng_Services_Int_Publish' channelName: '.NET Eng Services - Int' - channelId: 678 + channelId: ${{ parameters.NetEngServicesIntChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' @@ -308,7 +342,7 @@ stages: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} stageName: 'Net_Eng_Services_Prod_Publish' channelName: '.NET Eng Services - Prod' - channelId: 679 + channelId: ${{ parameters.NetEngServicesProdChannelId }} transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' diff --git a/global.json b/global.json index e747f7a..47f7e77 100644 --- a/global.json +++ b/global.json @@ -12,10 +12,10 @@ "python": "2.7.15" }, "msbuild-sdks": { - "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20117.3", - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20117.3", - "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20117.3", - "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20117.3", + "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20121.6", + "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20121.6", + "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20121.6", + "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20121.6", "FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "5.0.0-alpha.1.20076.2", "Microsoft.Build.NoTargets": "1.0.53", -- 2.7.4