Improve pipeline verbosity
This commit is contained in:
Родитель
24a9f718dd
Коммит
33e19c8934
|
@ -8,36 +8,35 @@
|
|||
.PARAMETER OutputPath
|
||||
The path of the output PDB to write.
|
||||
#>
|
||||
#Function Convert-PortableToWindowsPDB() {
|
||||
Param(
|
||||
[Parameter(Mandatory=$true,Position=0)]
|
||||
[string]$DllPath,
|
||||
[Parameter()]
|
||||
[string]$PdbPath,
|
||||
[Parameter(Mandatory=$true,Position=1)]
|
||||
[string]$OutputPath
|
||||
)
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$true,Position=0)]
|
||||
[string]$DllPath,
|
||||
[Parameter()]
|
||||
[string]$PdbPath,
|
||||
[Parameter(Mandatory=$true,Position=1)]
|
||||
[string]$OutputPath
|
||||
)
|
||||
|
||||
if ($IsMacOS -or $IsLinux) {
|
||||
Write-Error "This script only works on Windows"
|
||||
return
|
||||
}
|
||||
if ($IsMacOS -or $IsLinux) {
|
||||
Write-Error "This script only works on Windows"
|
||||
return
|
||||
}
|
||||
|
||||
$version = '1.1.0-beta2-21101-01'
|
||||
$baseDir = "$PSScriptRoot/../obj/tools"
|
||||
$pdb2pdbpath = "$baseDir/Microsoft.DiaSymReader.Pdb2Pdb.$version/tools/Pdb2Pdb.exe"
|
||||
if (-not (Test-Path $pdb2pdbpath)) {
|
||||
if (-not (Test-Path $baseDir)) { New-Item -Type Directory -Path $baseDir | Out-Null }
|
||||
$baseDir = (Resolve-Path $baseDir).Path # Normalize it
|
||||
Write-Verbose "& (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null"
|
||||
& (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null
|
||||
}
|
||||
$version = '1.1.0-beta2-21101-01'
|
||||
$baseDir = "$PSScriptRoot/../obj/tools"
|
||||
$pdb2pdbpath = "$baseDir/Microsoft.DiaSymReader.Pdb2Pdb.$version/tools/Pdb2Pdb.exe"
|
||||
if (-not (Test-Path $pdb2pdbpath)) {
|
||||
if (-not (Test-Path $baseDir)) { New-Item -Type Directory -Path $baseDir | Out-Null }
|
||||
$baseDir = (Resolve-Path $baseDir).Path # Normalize it
|
||||
Write-Verbose "& (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null"
|
||||
& (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null
|
||||
}
|
||||
|
||||
$args = $DllPath,'/out',$OutputPath,'/nowarn','0021'
|
||||
if ($PdbPath) {
|
||||
$args += '/pdb',$PdbPath
|
||||
}
|
||||
$args = $DllPath,'/out',$OutputPath,'/nowarn','0021'
|
||||
if ($PdbPath) {
|
||||
$args += '/pdb',$PdbPath
|
||||
}
|
||||
|
||||
Write-Verbose "$pdb2pdbpath $args"
|
||||
& $pdb2pdbpath $args
|
||||
#}
|
||||
Write-Verbose "$pdb2pdbpath $args"
|
||||
& $pdb2pdbpath $args
|
||||
|
|
|
@ -4,10 +4,17 @@
|
|||
.PARAMETER SbomNotRequired
|
||||
Indicates that returning the artifacts available is preferable to nothing at all when the SBOM has not yet been generated.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[switch]$SbomNotRequired
|
||||
)
|
||||
|
||||
if ($IsMacOS -or $IsLinux) {
|
||||
# We only package up for insertions on Windows agents since they are where optprof can happen.
|
||||
Write-Verbose "Skipping VSInsertion artifact since we're not on Windows."
|
||||
return @{}
|
||||
}
|
||||
|
||||
$RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..")
|
||||
$BuildConfiguration = $env:BUILDCONFIGURATION
|
||||
if (!$BuildConfiguration) {
|
||||
|
@ -17,9 +24,15 @@ if (!$BuildConfiguration) {
|
|||
$PackagesRoot = "$RepoRoot/bin/Packages/$BuildConfiguration/NuGet"
|
||||
|
||||
# This artifact is not ready if we're running on the devdiv AzDO account and we don't have an SBOM yet.
|
||||
if ($env:SYSTEM_COLLECTIONID -eq '011b8bdf-6d56-4f87-be0d-0092136884d9' -and -not (Test-Path $PackagesRoot/_manifest) -and -not $SbomNotRequired) { return @{} }
|
||||
if ($env:SYSTEM_COLLECTIONID -eq '011b8bdf-6d56-4f87-be0d-0092136884d9' -and -not (Test-Path $PackagesRoot/_manifest) -and -not $SbomNotRequired) {
|
||||
Write-Host "Skipping because SBOM isn't generated yet."
|
||||
return @{}
|
||||
}
|
||||
|
||||
if (!(Test-Path $PackagesRoot)) { return @{} }
|
||||
if (!(Test-Path $PackagesRoot)) {
|
||||
Write-Warning "Skipping because packages haven't been built yet."
|
||||
return @{}
|
||||
}
|
||||
|
||||
@{
|
||||
"$PackagesRoot" = (Get-ChildItem $PackagesRoot -Recurse)
|
||||
|
|
|
@ -19,7 +19,7 @@ steps:
|
|||
BuildDropPath: $(System.DefaultWorkingDirectory)/bin/Library/$(BuildConfiguration)
|
||||
BuildComponentPath: $(System.DefaultWorkingDirectory)/obj/src/Library
|
||||
|
||||
- powershell: Copy-Item -Recurse "$(System.DefaultWorkingDirectory)/bin/Library/$(BuildConfiguration)/_manifest" "$(System.DefaultWorkingDirectory)/bin/Packages/$(BuildConfiguration)/NuGet"
|
||||
- powershell: Copy-Item -Recurse -Verbose "$(System.DefaultWorkingDirectory)/bin/Library/$(BuildConfiguration)/_manifest" "$(System.DefaultWorkingDirectory)/bin/Packages/$(BuildConfiguration)/NuGet"
|
||||
displayName: Publish Software Bill of Materials
|
||||
|
||||
- task: Ref12Analyze@0
|
||||
|
|
Загрузка…
Ссылка в новой задаче