You've already forked linux-packaging-mono
Imported Upstream version 6.8.0.73
Former-commit-id: d18deab1b47cfd3ad8cba82b3f37d00eec2170af
This commit is contained in:
parent
bceda29824
commit
73ee7591e8
4
external/linker/eng/Version.Details.xml
vendored
4
external/linker/eng/Version.Details.xml
vendored
@ -3,9 +3,9 @@
|
||||
<ProductDependencies>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19412.1">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19502.11">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>ec2dd5b3e7d11b88b2ca0688bb1685836cfad20a</Sha>
|
||||
<Sha>da75c6547c64a91eb8a9cecf8c503331c2cc394a</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
|
9
external/linker/eng/Versions.props
vendored
9
external/linker/eng/Versions.props
vendored
@ -5,16 +5,11 @@
|
||||
<PreReleaseVersionLabel>prerelease</PreReleaseVersionLabel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<MicrosoftNetCoreIlasmPackageVersion>3.0.0-preview4-27520-71</MicrosoftNetCoreIlasmPackageVersion>
|
||||
<!-- ilasm -->
|
||||
<MicrosoftNETCoreILAsmPackageVersion>5.0.0-alpha1.19413.7</MicrosoftNETCoreILAsmPackageVersion>
|
||||
<!-- These should match the SDK version at https://github.com/dotnet/sdk/blob/master/eng/Versions.props -->
|
||||
<SystemReflectionMetadataVersion>1.5.0</SystemReflectionMetadataVersion>
|
||||
<MicrosoftBuildFrameworkVersion>15.4.8</MicrosoftBuildFrameworkVersion>
|
||||
<MicrosoftBuildUtilitiesCoreVersion>15.4.8</MicrosoftBuildUtilitiesCoreVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RestoreSources>
|
||||
$(RestoreSources);
|
||||
https://dotnetfeed.blob.core.windows.net/dotnet-coreclr/index.json
|
||||
</RestoreSources>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
9
external/linker/eng/azure-pipelines.yml
vendored
9
external/linker/eng/azure-pipelines.yml
vendored
@ -1,3 +1,10 @@
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- release/*
|
||||
|
||||
variables:
|
||||
- name: officialBuild
|
||||
value: ${{ and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}
|
||||
@ -29,7 +36,7 @@ jobs:
|
||||
${{ if eq(variables.officialBuild, 'false') }}:
|
||||
name: Hosted VS2017
|
||||
${{ if eq(variables.officialBuild, 'true') }}:
|
||||
name: NetCoreInternal-Int-Pool
|
||||
name: NetCoreInternal-Pool
|
||||
queue: BuildPool.Windows.10.Amd64.VS2017
|
||||
variables:
|
||||
- ${{ if eq(variables.officialBuild, 'false') }}:
|
||||
|
4
external/linker/eng/common/build.ps1
vendored
4
external/linker/eng/common/build.ps1
vendored
@ -85,6 +85,10 @@ function Build {
|
||||
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
|
||||
# Explicitly set the type as string[] because otherwise PowerShell would make this char[] if $properties is empty.
|
||||
[string[]] $msbuildArgs = $properties
|
||||
|
||||
# Resolve relative project paths into full paths
|
||||
$projects = ($projects.Split(';').ForEach({Resolve-Path $_}) -join ';')
|
||||
|
||||
$msbuildArgs += "/p:Projects=$projects"
|
||||
$properties = $msbuildArgs
|
||||
}
|
||||
|
6
external/linker/eng/common/darc-init.ps1
vendored
6
external/linker/eng/common/darc-init.ps1
vendored
@ -1,9 +1,9 @@
|
||||
param (
|
||||
$darcVersion = $null,
|
||||
$versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
|
||||
$versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16",
|
||||
$verbosity = "m"
|
||||
)
|
||||
|
||||
$verbosity = "m"
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function InstallDarcCli ($darcVersion) {
|
||||
@ -23,7 +23,7 @@ function InstallDarcCli ($darcVersion) {
|
||||
$darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content
|
||||
}
|
||||
|
||||
$arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json'
|
||||
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
|
||||
Write-Host "Installing Darc CLI version $darcVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
|
8
external/linker/eng/common/darc-init.sh
vendored
8
external/linker/eng/common/darc-init.sh
vendored
@ -3,6 +3,7 @@
|
||||
source="${BASH_SOURCE[0]}"
|
||||
darcVersion=''
|
||||
versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
|
||||
verbosity=m
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "$1" | awk '{print tolower($0)}')"
|
||||
@ -15,6 +16,10 @@ while [[ $# > 0 ]]; do
|
||||
versionEndpoint=$2
|
||||
shift
|
||||
;;
|
||||
--verbosity)
|
||||
verbosity=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
usage
|
||||
@ -34,7 +39,6 @@ while [[ -h "$source" ]]; do
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
verbosity=m
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
@ -54,7 +58,7 @@ function InstallDarcCli {
|
||||
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
|
||||
fi
|
||||
|
||||
local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json"
|
||||
local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"
|
||||
|
||||
echo "Installing Darc CLI version $darcVersion..."
|
||||
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
|
||||
|
6
external/linker/eng/common/enable-cross-org-publishing.ps1
vendored
Normal file
6
external/linker/eng/common/enable-cross-org-publishing.ps1
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
param(
|
||||
[string] $token
|
||||
)
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=VSS_NUGET_ACCESSTOKEN]$token"
|
||||
Write-Host "##vso[task.setvariable variable=VSS_NUGET_URI_PREFIXES]https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/"
|
@ -133,6 +133,7 @@ try {
|
||||
if (Test-Path $InstallBin) {
|
||||
Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
|
||||
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
|
||||
return $InstallBin
|
||||
}
|
||||
else {
|
||||
Write-Error "Native tools install directory does not exist, installation failed"
|
||||
|
@ -152,6 +152,8 @@ function Get-File {
|
||||
}
|
||||
else {
|
||||
Write-Verbose "Downloading $Uri"
|
||||
# Don't display the console progress UI - it's a huge perf hit
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
while($Attempt -Lt $DownloadRetries)
|
||||
{
|
||||
try {
|
||||
|
@ -5,8 +5,14 @@
|
||||
<CliArguments>--dotnet-versions %DOTNET_VERSION% --cli-source-info args --cli-branch %PERFLAB_BRANCH% --cli-commit-sha %PERFLAB_HASH% --cli-repository https://github.com/%PERFLAB_REPO% --cli-source-timestamp %PERFLAB_BUILDTIMESTAMP%</CliArguments>
|
||||
<Python>py -3</Python>
|
||||
<CoreRun>%HELIX_CORRELATION_PAYLOAD%\Core_Root\CoreRun.exe</CoreRun>
|
||||
<BaselineCoreRun>%HELIX_CORRELATION_PAYLOAD%\Baseline_Core_Root\CoreRun.exe</BaselineCoreRun>
|
||||
<HelixPreCommands>$(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd</HelixPreCommands>
|
||||
<ArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts</ArtifactsDirectory>
|
||||
<BaselineArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
|
||||
<ResultsComparer>%HELIX_CORRELATION_PAYLOAD%\performance\src\tools\ResultsComparer\ResultsComparer.csproj</ResultsComparer>
|
||||
<DotnetExe>%HELIX_CORRELATION_PAYLOAD%\performance\tools\dotnet\$(Architecture)\dotnet.exe</DotnetExe>
|
||||
<Percent>%25%25</Percent>
|
||||
<XMLResults>%HELIX_WORKITEM_ROOT%\testResults.xml</XMLResults>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT' and '$(RunFromPerfRepo)' == 'false'">
|
||||
@ -24,14 +30,24 @@
|
||||
<CliArguments>--dotnet-versions $DOTNET_VERSION --cli-source-info args --cli-branch $PERFLAB_BRANCH --cli-commit-sha $PERFLAB_HASH --cli-repository https://github.com/$PERFLAB_REPO --cli-source-timestamp $PERFLAB_BUILDTIMESTAMP</CliArguments>
|
||||
<Python>python3</Python>
|
||||
<CoreRun>$(BaseDirectory)/Core_Root/corerun</CoreRun>
|
||||
<BaselineCoreRun>$(BaseDirectory)/Baseline_Core_Root/corerun</BaselineCoreRun>
|
||||
<HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh</HelixPreCommands>
|
||||
<ArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts</ArtifactsDirectory>
|
||||
<BaselineArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
|
||||
<ResultsComparer>$(PerformanceDirectory)/src/tools/ResultsComparer/ResultsComparer.csproj</ResultsComparer>
|
||||
<DotnetExe>$(PerformanceDirectory)/tools/dotnet/$(Architecture)/dotnet</DotnetExe>
|
||||
<Percent>%25</Percent>
|
||||
<XMLResults>$HELIX_WORKITEM_ROOT/testResults.xml</XMLResults>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(UseCoreRun)' == 'true'">
|
||||
<CoreRunArgument>--corerun $(CoreRun)</CoreRunArgument>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(UseBaselineCoreRun)' == 'true'">
|
||||
<BaselineCoreRunArgument>--corerun $(BaselineCoreRun)</BaselineCoreRunArgument>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(WorkItemCommand)' != ''">
|
||||
<WorkItemCommand>$(Python) $(WorkItemCommand) --incremental no --architecture $(Architecture) -f $(_Framework) $(PerfLabArguments)</WorkItemCommand>
|
||||
</PropertyGroup>
|
||||
@ -57,20 +73,29 @@
|
||||
<Partition Include="$(BuildConfig).Partition4" Index="4" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Compare)' == 'true'">
|
||||
<FailOnTestFailure>false</FailOnTestFailure>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Partition the Microbenchmarks project, but nothing else
|
||||
-->
|
||||
<ItemGroup Condition="$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
|
||||
<HelixWorkItem Include="@(Partition)">
|
||||
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
|
||||
<Command>$(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
|
||||
<PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</PreCommands>
|
||||
<Command>$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
|
||||
<PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults);$(FinalCommand)</PostCommands>
|
||||
<Timeout>4:00</Timeout>
|
||||
</HelixWorkItem>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="!$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
|
||||
<HelixWorkItem Include="$(BuildConfig).WorkItem">
|
||||
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
|
||||
<Command>$(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory)"</Command>
|
||||
<PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument)"</PreCommands>
|
||||
<Command>$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)"</Command>
|
||||
<PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults)</PostCommands>
|
||||
<Timeout>4:00</Timeout>
|
||||
</HelixWorkItem>
|
||||
</ItemGroup>
|
||||
|
@ -1,8 +1,9 @@
|
||||
Param(
|
||||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY,
|
||||
[string] $CoreRootDirectory,
|
||||
[string] $BaselineCoreRootDirectory,
|
||||
[string] $Architecture="x64",
|
||||
[string] $Framework="netcoreapp3.0",
|
||||
[string] $Framework="netcoreapp5.0",
|
||||
[string] $CompilationMode="Tiered",
|
||||
[string] $Repository=$env:BUILD_REPOSITORY_NAME,
|
||||
[string] $Branch=$env:BUILD_SOURCEBRANCH,
|
||||
@ -12,11 +13,13 @@ Param(
|
||||
[string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
|
||||
[string] $Kind="micro",
|
||||
[switch] $Internal,
|
||||
[switch] $Compare,
|
||||
[string] $Configurations="CompilationMode=$CompilationMode"
|
||||
)
|
||||
|
||||
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance")
|
||||
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
|
||||
$UseCoreRun = ($CoreRootDirectory -ne [string]::Empty)
|
||||
$UseBaselineCoreRun = ($BaselineCoreRootDirectory -ne [string]::Empty)
|
||||
|
||||
$PayloadDirectory = (Join-Path $SourceDirectory "Payload")
|
||||
$PerformanceDirectory = (Join-Path $PayloadDirectory "performance")
|
||||
@ -29,11 +32,17 @@ $HelixSourcePrefix = "pr"
|
||||
$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open"
|
||||
|
||||
if ($Framework.StartsWith("netcoreapp")) {
|
||||
$Queue = "Windows.10.Amd64.ClientRS4.Open"
|
||||
$Queue = "Windows.10.Amd64.ClientRS5.Open"
|
||||
}
|
||||
|
||||
if ($Compare) {
|
||||
$Queue = "Windows.10.Amd64.19H1.Tiger.Perf.Open"
|
||||
$PerfLabArguments = ""
|
||||
$ExtraBenchmarkDotNetArguments = ""
|
||||
}
|
||||
|
||||
if ($Internal) {
|
||||
$Queue = "Windows.10.Amd64.ClientRS5.Perf"
|
||||
$Queue = "Windows.10.Amd64.19H1.Tiger.Perf"
|
||||
$PerfLabArguments = "--upload-to-perflab-container"
|
||||
$ExtraBenchmarkDotNetArguments = ""
|
||||
$Creator = ""
|
||||
@ -56,6 +65,10 @@ if ($UseCoreRun) {
|
||||
$NewCoreRoot = (Join-Path $PayloadDirectory "Core_Root")
|
||||
Move-Item -Path $CoreRootDirectory -Destination $NewCoreRoot
|
||||
}
|
||||
if ($UseBaselineCoreRun) {
|
||||
$NewBaselineCoreRoot = (Join-Path $PayloadDirectory "Baseline_Core_Root")
|
||||
Move-Item -Path $BaselineCoreRootDirectory -Destination $NewBaselineCoreRoot
|
||||
}
|
||||
|
||||
$DocsDir = (Join-Path $PerformanceDirectory "docs")
|
||||
robocopy $DocsDir $WorkItemDirectory
|
||||
@ -80,7 +93,9 @@ Write-PipelineSetVariable -Name 'TargetCsproj' -Value "$Csproj" -IsMultiJobVaria
|
||||
Write-PipelineSetVariable -Name 'Kind' -Value "$Kind" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'Architecture' -Value "$Architecture" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'UseCoreRun' -Value "$UseCoreRun" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'UseBaselineCoreRun' -Value "$UseBaselineCoreRun" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRepo" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'Compare' -Value "$Compare" -IsMultiJobVariable $false
|
||||
|
||||
# Helix Arguments
|
||||
Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false
|
||||
|
@ -2,20 +2,23 @@
|
||||
|
||||
source_directory=$BUILD_SOURCESDIRECTORY
|
||||
core_root_directory=
|
||||
baseline_core_root_directory=
|
||||
architecture=x64
|
||||
framework=netcoreapp3.0
|
||||
framework=netcoreapp5.0
|
||||
compilation_mode=tiered
|
||||
repository=$BUILD_REPOSITORY_NAME
|
||||
branch=$BUILD_SOURCEBRANCH
|
||||
commit_sha=$BUILD_SOURCEVERSION
|
||||
build_number=$BUILD_BUILDNUMBER
|
||||
internal=false
|
||||
compare=false
|
||||
kind="micro"
|
||||
run_categories="coreclr corefx"
|
||||
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
|
||||
configurations=
|
||||
run_from_perf_repo=false
|
||||
use_core_run=true
|
||||
use_baseline_core_run=true
|
||||
|
||||
while (($# > 0)); do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
@ -28,6 +31,10 @@ while (($# > 0)); do
|
||||
core_root_directory=$2
|
||||
shift 2
|
||||
;;
|
||||
--baselinecorerootdirectory)
|
||||
baseline_core_root_directory=$2
|
||||
shift 2
|
||||
;;
|
||||
--architecture)
|
||||
architecture=$2
|
||||
shift 2
|
||||
@ -72,6 +79,10 @@ while (($# > 0)); do
|
||||
internal=true
|
||||
shift 1
|
||||
;;
|
||||
--compare)
|
||||
compare=true
|
||||
shift 1
|
||||
;;
|
||||
--configurations)
|
||||
configurations=$2
|
||||
shift 2
|
||||
@ -102,7 +113,7 @@ while (($# > 0)); do
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ "$repository" == "dotnet/performance" ]]; then
|
||||
if [ "$repository" == "dotnet/performance" ] || [ "$repository" == "dotnet-performance" ]; then
|
||||
run_from_perf_repo=true
|
||||
fi
|
||||
|
||||
@ -114,6 +125,10 @@ if [ -z "$core_root_directory" ]; then
|
||||
use_core_run=false
|
||||
fi
|
||||
|
||||
if [ -z "$baseline_core_root_directory" ]; then
|
||||
use_baseline_core_run=false
|
||||
fi
|
||||
|
||||
payload_directory=$source_directory/Payload
|
||||
performance_directory=$payload_directory/performance
|
||||
workitem_directory=$source_directory/workitem
|
||||
@ -123,6 +138,19 @@ queue=Ubuntu.1804.Amd64.Open
|
||||
creator=$BUILD_DEFINITIONNAME
|
||||
helix_source_prefix="pr"
|
||||
|
||||
if [[ "$compare" == true ]]; then
|
||||
extra_benchmark_dotnet_arguments=
|
||||
perflab_arguments=
|
||||
|
||||
# No open queues for arm64
|
||||
if [[ "$architecture" = "arm64" ]]; then
|
||||
echo "Compare not available for arm64"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
queue=Ubuntu.1804.Amd64.Tiger.Perf.Open
|
||||
fi
|
||||
|
||||
if [[ "$internal" == true ]]; then
|
||||
perflab_arguments="--upload-to-perflab-container"
|
||||
helix_source_prefix="official"
|
||||
@ -132,7 +160,7 @@ if [[ "$internal" == true ]]; then
|
||||
if [[ "$architecture" = "arm64" ]]; then
|
||||
queue=Ubuntu.1804.Arm64.Perf
|
||||
else
|
||||
queue=Ubuntu.1804.Amd64.Perf
|
||||
queue=Ubuntu.1804.Amd64.Tiger.Perf
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -156,21 +184,33 @@ if [[ "$use_core_run" = true ]]; then
|
||||
mv $core_root_directory $new_core_root
|
||||
fi
|
||||
|
||||
if [[ "$use_baseline_core_run" = true ]]; then
|
||||
new_baseline_core_root=$payload_directory/Baseline_Core_Root
|
||||
mv $baseline_core_root_directory $new_baseline_core_root
|
||||
fi
|
||||
|
||||
ci=true
|
||||
|
||||
_script_dir=$(pwd)/eng/common
|
||||
. "$_script_dir/pipeline-logging-functions.sh"
|
||||
|
||||
# Make sure all of our variables are available for future steps
|
||||
echo "##vso[task.setvariable variable=UseCoreRun]$use_core_run"
|
||||
echo "##vso[task.setvariable variable=Architecture]$architecture"
|
||||
echo "##vso[task.setvariable variable=PayloadDirectory]$payload_directory"
|
||||
echo "##vso[task.setvariable variable=PerformanceDirectory]$performance_directory"
|
||||
echo "##vso[task.setvariable variable=WorkItemDirectory]$workitem_directory"
|
||||
echo "##vso[task.setvariable variable=Queue]$queue"
|
||||
echo "##vso[task.setvariable variable=SetupArguments]$setup_arguments"
|
||||
echo "##vso[task.setvariable variable=Python]python3"
|
||||
echo "##vso[task.setvariable variable=PerfLabArguments]$perflab_arguments"
|
||||
echo "##vso[task.setvariable variable=ExtraBenchmarkDotNetArguments]$extra_benchmark_dotnet_arguments"
|
||||
echo "##vso[task.setvariable variable=BDNCategories]$run_categories"
|
||||
echo "##vso[task.setvariable variable=TargetCsproj]$csproj"
|
||||
echo "##vso[task.setvariable variable=RunFromPerfRepo]$run_from_perf_repo"
|
||||
echo "##vso[task.setvariable variable=Creator]$creator"
|
||||
echo "##vso[task.setvariable variable=HelixSourcePrefix]$helix_source_prefix"
|
||||
echo "##vso[task.setvariable variable=Kind]$kind"
|
||||
echo "##vso[task.setvariable variable=_BuildConfig]$architecture.$kind.$framework"
|
||||
Write-PipelineSetVariable -name "UseCoreRun" -value "$use_core_run" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "UseBaselineCoreRun" -value "$use_baseline_core_run" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Architecture" -value "$architecture" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "PayloadDirectory" -value "$payload_directory" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "PerformanceDirectory" -value "$performance_directory" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "WorkItemDirectory" -value "$workitem_directory" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Queue" -value "$queue" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "SetupArguments" -value "$setup_arguments" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Python" -value "$python3" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "PerfLabArguments" -value "$perflab_arguments" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "ExtraBenchmarkDotNetArguments" -value "$extra_benchmark_dotnet_arguments" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "BDNCategories" -value "$run_categories" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "TargetCsproj" -value "$csproj" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "RunFromPerfRepo" -value "$run_from_perf_repo" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Creator" -value "$creator" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "HelixSourcePrefix" -value "$helix_source_prefix" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Kind" -value "$kind" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "_BuildConfig" -value "$architecture.$kind.$framework" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Compare" -value "$compare" -is_multi_job_variable false
|
||||
|
@ -19,7 +19,17 @@ try {
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
|
||||
# For now, only use a dry run.
|
||||
# Ideally we would change darc to enable a quick request that
|
||||
# would check whether the file exists that you can download it,
|
||||
# and that it won't conflict with other files.
|
||||
# https://github.com/dotnet/arcade/issues/3674
|
||||
# Right now we can't remove continue-on-error because we ocassionally will have
|
||||
# dependencies that have no associated builds (e.g. an old dependency).
|
||||
# We need to add an option to baseline specific dependencies away, or add them manually
|
||||
# to the BAR.
|
||||
darc gather-drop --non-shipping `
|
||||
--dry-run `
|
||||
--continue-on-error `
|
||||
--id $BarBuildId `
|
||||
--output-dir $DropLocation `
|
||||
|
@ -1,29 +0,0 @@
|
||||
param (
|
||||
$dotnetsymbolVersion = $null
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
$verbosity = "minimal"
|
||||
|
||||
function Installdotnetsymbol ($dotnetsymbolVersion) {
|
||||
$dotnetsymbolPackageName = "dotnet-symbol"
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
$toolList = & "$dotnet" tool list --global
|
||||
|
||||
if (($toolList -like "*$dotnetsymbolPackageName*") -and ($toolList -like "*$dotnetsymbolVersion*")) {
|
||||
Write-Host "dotnet-symbol version $dotnetsymbolVersion is already installed."
|
||||
}
|
||||
else {
|
||||
Write-Host "Installing dotnet-symbol version $dotnetsymbolVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
& "$dotnet" tool install $dotnetsymbolPackageName --version $dotnetsymbolVersion --verbosity $verbosity --global
|
||||
}
|
||||
}
|
||||
|
||||
Installdotnetsymbol $dotnetsymbolVersion
|
@ -1,29 +0,0 @@
|
||||
param (
|
||||
$sourcelinkCliVersion = $null
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
$verbosity = "minimal"
|
||||
|
||||
function InstallSourcelinkCli ($sourcelinkCliVersion) {
|
||||
$sourcelinkCliPackageName = "sourcelink"
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
$toolList = & "$dotnet" tool list --global
|
||||
|
||||
if (($toolList -like "*$sourcelinkCliPackageName*") -and ($toolList -like "*$sourcelinkCliVersion*")) {
|
||||
Write-Host "SourceLink CLI version $sourcelinkCliVersion is already installed."
|
||||
}
|
||||
else {
|
||||
Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
& "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity $verbosity --global
|
||||
}
|
||||
}
|
||||
|
||||
InstallSourcelinkCli $sourcelinkCliVersion
|
@ -1,8 +1,8 @@
|
||||
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] $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
|
||||
[Parameter(Mandatory=$false)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade
|
||||
[Parameter(Mandatory=$false)][string] $GHCommit, # GitHub commit SHA used to build the packages
|
||||
[Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use
|
||||
)
|
||||
|
||||
@ -13,6 +13,12 @@ param(
|
||||
# all files present in the repo at a specific commit point.
|
||||
$global:RepoFiles = @{}
|
||||
|
||||
# Maximum number of jobs to run in parallel
|
||||
$MaxParallelJobs = 6
|
||||
|
||||
# Wait time between check for system load
|
||||
$SecondsBetweenLoadChecks = 10
|
||||
|
||||
$ValidatePackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a Symbols.NuGet package
|
||||
@ -22,8 +28,8 @@ $ValidatePackage = {
|
||||
|
||||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
Write-PipelineTaskError "Input file does not exist: $PackagePath"
|
||||
ExitWithExitCode 1
|
||||
Write-Host "Input file does not exist: $PackagePath"
|
||||
return 1
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
@ -38,7 +44,7 @@ $ValidatePackage = {
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath) | Out-Null
|
||||
|
||||
try {
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
@ -138,16 +144,18 @@ $ValidatePackage = {
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
return 0
|
||||
}
|
||||
else {
|
||||
Write-PipelineTaskError "$PackagePath has broken SourceLink links."
|
||||
Write-Host "$PackagePath has broken SourceLink links."
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateSourceLinkLinks {
|
||||
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) {
|
||||
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>"
|
||||
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
@ -155,30 +163,33 @@ function ValidateSourceLinkLinks {
|
||||
}
|
||||
}
|
||||
|
||||
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
|
||||
Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string"
|
||||
if ($GHCommit -ne "" -and !($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
|
||||
Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
|
||||
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
|
||||
if ($GHRepoName -ne "" -and $GHCommit -ne "") {
|
||||
$RepoTreeURL = -Join("http://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 -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree
|
||||
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 -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree
|
||||
|
||||
foreach ($file in $Data) {
|
||||
$Extension = [System.IO.Path]::GetExtension($file.path)
|
||||
foreach ($file in $Data) {
|
||||
$Extension = [System.IO.Path]::GetExtension($file.path)
|
||||
|
||||
if ($CodeExtensions.Contains($Extension)) {
|
||||
$RepoFiles[$file.path] = 1
|
||||
if ($CodeExtensions.Contains($Extension)) {
|
||||
$RepoFiles[$file.path] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching."
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTaskError "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
|
||||
Write-Host $_
|
||||
ExitWithExitCode 1
|
||||
elseif ($GHRepoName -ne "" -or $GHCommit -ne "") {
|
||||
Write-Host "For using the http caching mechanism both GHRepoName and GHCommit should be informed."
|
||||
}
|
||||
|
||||
if (Test-Path $ExtractPath) {
|
||||
@ -186,14 +197,33 @@ function ValidateSourceLinkLinks {
|
||||
}
|
||||
|
||||
# Process each NuGet package in parallel
|
||||
$Jobs = @()
|
||||
Get-ChildItem "$InputPath\*.symbols.nupkg" |
|
||||
ForEach-Object {
|
||||
$Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName
|
||||
Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null
|
||||
$NumJobs = @(Get-Job -State 'Running').Count
|
||||
|
||||
while ($NumJobs -ge $MaxParallelJobs) {
|
||||
Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again."
|
||||
sleep $SecondsBetweenLoadChecks
|
||||
$NumJobs = @(Get-Job -State 'Running').Count
|
||||
}
|
||||
|
||||
foreach ($Job in @(Get-Job -State 'Completed')) {
|
||||
Receive-Job -Id $Job.Id
|
||||
Remove-Job -Id $Job.Id
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($Job in $Jobs) {
|
||||
Wait-Job -Id $Job.Id | Receive-Job
|
||||
$ValidationFailures = 0
|
||||
foreach ($Job in @(Get-Job)) {
|
||||
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
|
||||
if ($jobResult -ne "0") {
|
||||
$ValidationFailures++
|
||||
}
|
||||
}
|
||||
if ($ValidationFailures -gt 0) {
|
||||
Write-PipelineTaskError " $ValidationFailures package(s) failed validation."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,10 +37,10 @@ function FirstMatchingSymbolDescriptionOrDefault {
|
||||
# DWARF file for a .dylib
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
|
||||
|
||||
$dotnetsymbolExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
$dotnetsymbolExe = Resolve-Path "$dotnetsymbolExe\dotnet-symbol.exe"
|
||||
$dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
$dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe"
|
||||
|
||||
& $dotnetsymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
& $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
|
||||
if (Test-Path $PdbPath) {
|
||||
return "PDB"
|
||||
@ -159,25 +159,25 @@ function CheckSymbolsAvailable {
|
||||
}
|
||||
}
|
||||
|
||||
function Installdotnetsymbol {
|
||||
$dotnetsymbolPackageName = "dotnet-symbol"
|
||||
function InstallDotnetSymbol {
|
||||
$dotnetSymbolPackageName = "dotnet-symbol"
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
$toolList = & "$dotnet" tool list --global
|
||||
|
||||
if (($toolList -like "*$dotnetsymbolPackageName*") -and ($toolList -like "*$dotnetsymbolVersion*")) {
|
||||
Write-Host "dotnet-symbol version $dotnetsymbolVersion is already installed."
|
||||
if (($toolList -like "*$dotnetSymbolPackageName*") -and ($toolList -like "*$dotnetSymbolVersion*")) {
|
||||
Write-Host "dotnet-symbol version $dotnetSymbolVersion is already installed."
|
||||
}
|
||||
else {
|
||||
Write-Host "Installing dotnet-symbol version $dotnetsymbolVersion..."
|
||||
Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
& "$dotnet" tool install $dotnetsymbolPackageName --version $dotnetsymbolVersion --verbosity "minimal" --global
|
||||
& "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Installdotnetsymbol
|
||||
InstallDotnetSymbol
|
||||
|
||||
CheckSymbolsAvailable
|
||||
}
|
||||
|
@ -1,30 +1,30 @@
|
||||
Param(
|
||||
[string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified)
|
||||
[string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified)
|
||||
[string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified
|
||||
[string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
|
||||
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
|
||||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
|
||||
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_SOURCESDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located
|
||||
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
|
||||
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
|
||||
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
|
||||
[bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber)
|
||||
[bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed
|
||||
[bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
|
||||
[string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
|
||||
[string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified)
|
||||
[string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified)
|
||||
[string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified
|
||||
[string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
|
||||
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
|
||||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
|
||||
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located
|
||||
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
|
||||
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
|
||||
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
|
||||
[bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber)
|
||||
[bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed
|
||||
[bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
|
||||
[string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@ -45,6 +45,7 @@ if ($GuardianPackageName) {
|
||||
$guardianCliLocation = $GuardianCliLocation
|
||||
}
|
||||
|
||||
$workingDirectory = (Split-Path $SourceDirectory -Parent)
|
||||
$ValidPath = Test-Path $guardianCliLocation
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
@ -53,13 +54,13 @@ if ($ValidPath -eq $False)
|
||||
exit 1
|
||||
}
|
||||
|
||||
& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $ArtifactsDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
|
||||
$gdnFolder = Join-Path $ArtifactsDirectory ".gdn"
|
||||
& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
|
||||
$gdnFolder = Join-Path $workingDirectory ".gdn"
|
||||
|
||||
if ($TsaOnboard) {
|
||||
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
|
||||
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $ArtifactsDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $ArtifactsDirectory --logger-level $GuardianLoggerLevel
|
||||
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
@ -71,10 +72,10 @@ if ($TsaOnboard) {
|
||||
}
|
||||
|
||||
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $ArtifactsDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $ArtifactsDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
|
||||
if ($UpdateBaseline) {
|
||||
@ -86,8 +87,8 @@ if ($TsaPublish) {
|
||||
if (-not $TsaRepositoryName) {
|
||||
$TsaRepositoryName = "$($Repository)-$($BranchName)"
|
||||
}
|
||||
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $SourceDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $ArtifactsDirectory --logger-level $GuardianLoggerLevel
|
||||
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
|
@ -5,6 +5,13 @@ param(
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the post-build
|
||||
# scripts don't necessarily execute in the same agent that run the
|
||||
# build.ps1/sh script this variable isn't automatically set.
|
||||
$ci = $true
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
$ExtractPackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a NuGet package
|
||||
|
3
external/linker/eng/common/sdl/init-sdl.ps1
vendored
3
external/linker/eng/common/sdl/init-sdl.ps1
vendored
@ -11,6 +11,9 @@ $ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
# Don't display the console progress UI - it's a huge perf hit
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file
|
||||
$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken"))
|
||||
$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn")
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user