diff options
author | dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> | 2020-09-16 16:45:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 16:45:14 +0300 |
commit | 391d76f434873a823e4f3a0f4400636049b0327e (patch) | |
tree | cd4b1fb15e49d2d5f21fe05cf9db396a46e2cbb6 /eng/common | |
parent | 90fd1feac709a910ba2aa849657b0c04777fc67d (diff) |
Update dependencies from https://github.com/dotnet/arcade build 20200914.13 (#1495)
[master] Update dependencies from dotnet/arcade
Diffstat (limited to 'eng/common')
-rw-r--r-- | eng/common/post-build/sourcelink-validation.ps1 | 26 | ||||
-rw-r--r-- | eng/common/post-build/symbols-validation.ps1 | 7 |
2 files changed, 21 insertions, 12 deletions
diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 index cdd1bba4f..c7e7ae67d 100644 --- a/eng/common/post-build/sourcelink-validation.ps1 +++ b/eng/common/post-build/sourcelink-validation.ps1 @@ -144,11 +144,27 @@ $ValidatePackage = { if ($FailedFiles -eq 0) { Write-Host 'Passed.' - return 0 + return [pscustomobject]@{ + result = 0 + packagePath = $PackagePath + } } else { Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links." - return 1 + return [pscustomobject]@{ + result = 1 + packagePath = $PackagePath + } + } +} + +function CheckJobResult( + $result, + $packagePath, + [ref]$ValidationFailures) { + if ($jobResult.result -ne '0') { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$packagePath has broken SourceLink links." + $ValidationFailures.Value++ } } @@ -211,10 +227,8 @@ function ValidateSourceLinkLinks { } foreach ($Job in @(Get-Job -State 'Completed')) { - $jobResult = Receive-Job -Id $Job.Id - if ($jobResult -ne '0') { - $ValidationFailures++ - } + $jobResult = Wait-Job -Id $Job.Id | Receive-Job + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) Remove-Job -Id $Job.Id } } diff --git a/eng/common/post-build/symbols-validation.ps1 b/eng/common/post-build/symbols-validation.ps1 index a36fa6f26..fcc6019b4 100644 --- a/eng/common/post-build/symbols-validation.ps1 +++ b/eng/common/post-build/symbols-validation.ps1 @@ -141,11 +141,6 @@ $CountMissingSymbols = { if ($using:Clean) { Remove-Item $ExtractPath -Recurse -Force } - - if ($MissingSymbols -ne 0) - { - Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $MissingSymbols modules in the package $PackagePath" - } Pop-Location @@ -165,6 +160,7 @@ function CheckJobResult( $DupedSymbols.Value++ } elseif ($jobResult.result -ne '0') { + Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $result modules in the package $packagePath" $TotalFailures.Value++ } } @@ -201,7 +197,6 @@ function CheckSymbolsAvailable { Start-Job -ScriptBlock $CountMissingSymbols -ArgumentList $FullName | Out-Null $NumJobs = @(Get-Job -State 'Running').Count - Write-Host $NumJobs while ($NumJobs -ge $MaxParallelJobs) { Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again." |