[main] Update dependencies from dotnet/arcade (#864)
* Update dependencies from https://github.com/dotnet/arcade build 20210611.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21311.3 * Update dependencies from https://github.com/dotnet/arcade build 20210614.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21314.1 * Update dependencies from https://github.com/dotnet/arcade build 20210616.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21316.3 * Update dependencies from https://github.com/dotnet/arcade build 20210617.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21317.1 * Update dependencies from https://github.com/dotnet/arcade build 20210618.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21318.2 * Update dependencies from https://github.com/dotnet/arcade build 20210619.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21319.2 * Update dependencies from https://github.com/dotnet/arcade build 20210621.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21321.1 * Update dependencies from https://github.com/dotnet/arcade build 20210621.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21321.2 * Update dependencies from https://github.com/dotnet/arcade build 20210623.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21323.1 * Update dependencies from https://github.com/dotnet/arcade build 20210624.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21324.3 * Update dependencies from https://github.com/dotnet/arcade build 20210628.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21328.2 * Update dependencies from https://github.com/dotnet/arcade build 20210629.8 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21329.8 * Update dependencies from https://github.com/dotnet/arcade build 20210630.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21330.2 * Update dependencies from https://github.com/dotnet/arcade build 20210701.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21351.2 * Update dependencies from https://github.com/dotnet/arcade build 20210705.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21355.2 * Update dependencies from https://github.com/dotnet/arcade build 20210707.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21357.3 * Update dependencies from https://github.com/dotnet/arcade build 20210709.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21359.3 * Update dependencies from https://github.com/dotnet/arcade build 20210713.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21363.2 * Update dependencies from https://github.com/dotnet/arcade build 20210714.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21364.3 * Update dependencies from https://github.com/dotnet/arcade build 20210715.11 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21365.11 * Update dependencies from https://github.com/dotnet/arcade build 20210716.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21366.1 * Update dependencies from https://github.com/dotnet/arcade build 20210719.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21369.3 * Update dependencies from https://github.com/dotnet/arcade build 20210720.12 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21370.12 * Update dependencies from https://github.com/dotnet/arcade build 20210723.11 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21373.11 * Update dependencies from https://github.com/dotnet/arcade build 20210726.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21376.4 * Update dependencies from https://github.com/dotnet/arcade build 20210727.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21377.2 * Update dependencies from https://github.com/dotnet/arcade build 20210728.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21378.2 * Update dependencies from https://github.com/dotnet/arcade build 20210729.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21379.2 * Update dependencies from https://github.com/dotnet/arcade build 20210803.5 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21403.5 * Update dependencies from https://github.com/dotnet/arcade build 20210806.6 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21406.6 * Update dependencies from https://github.com/dotnet/arcade build 20210810.8 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21410.8 * Update dependencies from https://github.com/dotnet/arcade build 20210812.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21412.1 * Update dependencies from https://github.com/dotnet/arcade build 20210813.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21413.4 * Update dependencies from https://github.com/dotnet/arcade build 20210817.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21417.1 * Update dependencies from https://github.com/dotnet/arcade build 20210818.12 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21418.12 * Update dependencies from https://github.com/dotnet/arcade build 20210819.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21419.2 * Update dependencies from https://github.com/dotnet/arcade build 20210820.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21420.4 * Update dependencies from https://github.com/dotnet/arcade build 20210824.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21424.3 * Update dependencies from https://github.com/dotnet/arcade build 20210825.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21425.3 * Update dependencies from https://github.com/dotnet/arcade build 20210826.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21426.2 * Update dependencies from https://github.com/dotnet/arcade build 20210827.6 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21427.6 * Update dependencies from https://github.com/dotnet/arcade build 20210830.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21430.1 * Update dependencies from https://github.com/dotnet/arcade build 20210901.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21451.3 * Update dependencies from https://github.com/dotnet/arcade build 20210902.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21452.4 * Update dependencies from https://github.com/dotnet/arcade build 20210903.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21453.2 * Update dependencies from https://github.com/dotnet/arcade build 20210906.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21456.1 * Update dependencies from https://github.com/dotnet/arcade build 20210907.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21457.3 * Update dependencies from https://github.com/dotnet/arcade build 20210909.5 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21459.5 * Update dependencies from https://github.com/dotnet/arcade build 20210913.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21463.4 * Update dependencies from https://github.com/dotnet/arcade build 20210916.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21466.4 * Update dependencies from https://github.com/dotnet/arcade build 20210920.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21470.4 * Update dependencies from https://github.com/dotnet/arcade build 20210921.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21471.3 * Update dependencies from https://github.com/dotnet/arcade build 20210922.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21472.4 * Update dependencies from https://github.com/dotnet/arcade build 20210923.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21473.1 * Update dependencies from https://github.com/dotnet/arcade build 20210924.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21474.2 * Update dependencies from https://github.com/dotnet/arcade build 20211007.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21507.3 * Update dependencies from https://github.com/dotnet/arcade build 20211008.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21508.1 * Update dependencies from https://github.com/dotnet/arcade build 20211011.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21511.1 * Update dependencies from https://github.com/dotnet/arcade build 20211012.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21512.3 * Update dependencies from https://github.com/dotnet/arcade build 20211013.5 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21513.5 * Update dependencies from https://github.com/dotnet/arcade build 20211014.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21514.3 * Update dependencies from https://github.com/dotnet/arcade build 20211015.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21515.2 * Update dependencies from https://github.com/dotnet/arcade build 20211018.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21518.1 * Update dependencies from https://github.com/dotnet/arcade build 20211018.6 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21518.6 * Update dependencies from https://github.com/dotnet/arcade build 20211019.8 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21519.8 * Update dependencies from https://github.com/dotnet/arcade build 20211020.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21520.1 * Update dependencies from https://github.com/dotnet/arcade build 20211021.5 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21521.5 * Update dependencies from https://github.com/dotnet/arcade build 20211022.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21522.2 * Update dependencies from https://github.com/dotnet/arcade build 20211024.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21524.1 * Update dependencies from https://github.com/dotnet/arcade build 20211026.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21526.1 * Update dependencies from https://github.com/dotnet/arcade build 20211027.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21527.1 * Update dependencies from https://github.com/dotnet/arcade build 20211027.5 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21527.5 * Update dependencies from https://github.com/dotnet/arcade build 20211028.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21528.3 * Update dependencies from https://github.com/dotnet/arcade build 20211029.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21529.1 * Update dependencies from https://github.com/dotnet/arcade build 20211102.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21552.1 * Update dependencies from https://github.com/dotnet/arcade build 20211103.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21553.3 * Update dependencies from https://github.com/dotnet/arcade build 20211104.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21554.4 * Update dependencies from https://github.com/dotnet/arcade build 20211105.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21555.2 * Update dependencies from https://github.com/dotnet/arcade build 20211109.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21559.3 * Update dependencies from https://github.com/dotnet/arcade build 20211116.10 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21566.10 * Update dependencies from https://github.com/dotnet/arcade build 20211118.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21568.2 * Update dependencies from https://github.com/dotnet/arcade build 20211119.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21569.2 * Update dependencies from https://github.com/dotnet/arcade build 20211123.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21573.3 * Update dependencies from https://github.com/dotnet/arcade build 20211124.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21574.3 * Update dependencies from https://github.com/dotnet/arcade build 20211126.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21576.2 * Update dependencies from https://github.com/dotnet/arcade build 20211126.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21576.4 * Update dependencies from https://github.com/dotnet/arcade build 20211202.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21602.3 * Update dependencies from https://github.com/dotnet/arcade build 20211203.6 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21603.6 * Update dependencies from https://github.com/dotnet/arcade build 20211206.6 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21606.6 * Update dependencies from https://github.com/dotnet/arcade build 20211208.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21608.1 * Update dependencies from https://github.com/dotnet/arcade build 20211209.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21609.2 * Update dependencies from https://github.com/dotnet/arcade build 20211210.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21610.4 * Update dependencies from https://github.com/dotnet/arcade build 20211213.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21613.2 * Update dependencies from https://github.com/dotnet/arcade build 20211214.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21614.1 * Update dependencies from https://github.com/dotnet/arcade build 20211215.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21615.1 * Update dependencies from https://github.com/dotnet/arcade build 20211217.4 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21617.4 * Update dependencies from https://github.com/dotnet/arcade build 20211220.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21620.2 * Update dependencies from https://github.com/dotnet/arcade build 20211221.3 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21621.3 * Update dependencies from https://github.com/dotnet/arcade build 20211223.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21623.1 * Update dependencies from https://github.com/dotnet/arcade build 20211223.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21623.2 * Update dependencies from https://github.com/dotnet/arcade build 20211227.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21627.1 * Update dependencies from https://github.com/dotnet/arcade build 20211228.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21628.1 * Update dependencies from https://github.com/dotnet/arcade build 20211229.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21629.1 * Update dependencies from https://github.com/dotnet/arcade build 20211230.1 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.21630.1 * Update dependencies from https://github.com/dotnet/arcade build 20220103.2 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.22053.2 * Update dependencies from https://github.com/dotnet/arcade build 20220104.5 Microsoft.DotNet.Arcade.Sdk From Version 6.0.0-beta.21304.1 -> To Version 7.0.0-beta.22054.5 * Update to XUnit 2.4.2-pre.9 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Sam Harwell <Sam.Harwell@microsoft.com>
This commit is contained in:
Родитель
af543d4900
Коммит
1a7c8cd38e
|
@ -3,9 +3,9 @@
|
|||
<ProductDependencies>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21304.1">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.22054.5">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>
|
||||
<Sha>85188b0c348f3f7f8206f441ec2ee2da6dbb06fe</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
|
|
|
@ -158,4 +158,10 @@ if ($dotnet5Source -ne $null) {
|
|||
AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
}
|
||||
|
||||
$dotnet6Source = $sources.SelectSingleNode("add[@key='dotnet6']")
|
||||
if ($dotnet6Source -ne $null) {
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet6-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet6-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
}
|
||||
|
||||
$doc.Save($filename)
|
||||
|
|
|
@ -129,6 +129,30 @@ if [ "$?" == "0" ]; then
|
|||
PackageSources+=('dotnet5-internal-transport')
|
||||
fi
|
||||
|
||||
# Ensure dotnet6-internal and dotnet6-internal-transport are in the packageSources if the public dotnet6 feeds are present
|
||||
grep -i "<add key=\"dotnet6\"" $ConfigFile
|
||||
if [ "$?" == "0" ]; then
|
||||
grep -i "<add key=\"dotnet6-internal\"" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet6-internal to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet6-internal')
|
||||
|
||||
grep -i "<add key=\"dotnet6-internal-transport\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet6-internal-transport to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet6-internal-transport')
|
||||
fi
|
||||
|
||||
# I want things split line by line
|
||||
PrevIFS=$IFS
|
||||
IFS=$'\n'
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
__ARM_HARDFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
__TIZEN_CROSSDIR="$__ARM_HARDFP_CrossDir/tizen"
|
||||
|
||||
if [[ -z "$ROOTFS_DIR" ]]; then
|
||||
echo "ROOTFS_DIR is not defined."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp
|
||||
mkdir -p $TIZEN_TMP_DIR
|
||||
|
||||
# Download files
|
||||
echo ">>Start downloading files"
|
||||
VERBOSE=1 $__ARM_HARDFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR
|
||||
echo "<<Finish downloading files"
|
||||
|
||||
echo ">>Start constructing Tizen rootfs"
|
||||
TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm`
|
||||
cd $ROOTFS_DIR
|
||||
for f in $TIZEN_RPM_FILES; do
|
||||
rpm2cpio $f | cpio -idm --quiet
|
||||
done
|
||||
echo "<<Finish constructing Tizen rootfs"
|
||||
|
||||
# Cleanup tmp
|
||||
rm -rf $TIZEN_TMP_DIR
|
||||
|
||||
# Configure Tizen rootfs
|
||||
echo ">>Start configuring Tizen rootfs"
|
||||
ln -sfn asm-arm ./usr/include/asm
|
||||
patch -p1 < $__TIZEN_CROSSDIR/tizen.patch
|
||||
echo "<<Finish configuring Tizen rootfs"
|
|
@ -0,0 +1,170 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ -z "${VERBOSE// }" ]] || [ "$VERBOSE" -ne "$VERBOSE" ] 2>/dev/null; then
|
||||
VERBOSE=0
|
||||
fi
|
||||
|
||||
Log()
|
||||
{
|
||||
if [ $VERBOSE -ge $1 ]; then
|
||||
echo ${@:2}
|
||||
fi
|
||||
}
|
||||
|
||||
Inform()
|
||||
{
|
||||
Log 1 -e "\x1B[0;34m$@\x1B[m"
|
||||
}
|
||||
|
||||
Debug()
|
||||
{
|
||||
Log 2 -e "\x1B[0;32m$@\x1B[m"
|
||||
}
|
||||
|
||||
Error()
|
||||
{
|
||||
>&2 Log 0 -e "\x1B[0;31m$@\x1B[m"
|
||||
}
|
||||
|
||||
Fetch()
|
||||
{
|
||||
URL=$1
|
||||
FILE=$2
|
||||
PROGRESS=$3
|
||||
if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then
|
||||
CURL_OPT="--progress-bar"
|
||||
else
|
||||
CURL_OPT="--silent"
|
||||
fi
|
||||
curl $CURL_OPT $URL > $FILE
|
||||
}
|
||||
|
||||
hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; }
|
||||
hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; }
|
||||
hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; }
|
||||
|
||||
TMPDIR=$1
|
||||
if [ ! -d $TMPDIR ]; then
|
||||
TMPDIR=./tizen_tmp
|
||||
Debug "Create temporary directory : $TMPDIR"
|
||||
mkdir -p $TMPDIR
|
||||
fi
|
||||
|
||||
TIZEN_URL=http://download.tizen.org/snapshots/tizen
|
||||
BUILD_XML=build.xml
|
||||
REPOMD_XML=repomd.xml
|
||||
PRIMARY_XML=primary.xml
|
||||
TARGET_URL="http://__not_initialized"
|
||||
|
||||
Xpath_get()
|
||||
{
|
||||
XPATH_RESULT=''
|
||||
XPATH=$1
|
||||
XML_FILE=$2
|
||||
RESULT=$(xmllint --xpath $XPATH $XML_FILE)
|
||||
if [[ -z ${RESULT// } ]]; then
|
||||
Error "Can not find target from $XML_FILE"
|
||||
Debug "Xpath = $XPATH"
|
||||
exit 1
|
||||
fi
|
||||
XPATH_RESULT=$RESULT
|
||||
}
|
||||
|
||||
fetch_tizen_pkgs_init()
|
||||
{
|
||||
TARGET=$1
|
||||
PROFILE=$2
|
||||
Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE"
|
||||
|
||||
TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs
|
||||
if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi
|
||||
mkdir -p $TMP_PKG_DIR
|
||||
|
||||
PKG_URL=$TIZEN_URL/$PROFILE/latest
|
||||
|
||||
BUILD_XML_URL=$PKG_URL/$BUILD_XML
|
||||
TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML
|
||||
TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML
|
||||
TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML
|
||||
TMP_PRIMARYGZ=${TMP_PRIMARY}.gz
|
||||
|
||||
Fetch $BUILD_XML_URL $TMP_BUILD
|
||||
|
||||
Debug "fetch $BUILD_XML_URL to $TMP_BUILD"
|
||||
|
||||
TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()"
|
||||
Xpath_get $TARGET_XPATH $TMP_BUILD
|
||||
TARGET_PATH=$XPATH_RESULT
|
||||
TARGET_URL=$PKG_URL/$TARGET_PATH
|
||||
|
||||
REPOMD_URL=$TARGET_URL/repodata/repomd.xml
|
||||
PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)'
|
||||
|
||||
Fetch $REPOMD_URL $TMP_REPOMD
|
||||
|
||||
Debug "fetch $REPOMD_URL to $TMP_REPOMD"
|
||||
|
||||
Xpath_get $PRIMARY_XPATH $TMP_REPOMD
|
||||
PRIMARY_XML_PATH=$XPATH_RESULT
|
||||
PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH
|
||||
|
||||
Fetch $PRIMARY_URL $TMP_PRIMARYGZ
|
||||
|
||||
Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ"
|
||||
|
||||
gunzip $TMP_PRIMARYGZ
|
||||
|
||||
Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY"
|
||||
}
|
||||
|
||||
fetch_tizen_pkgs()
|
||||
{
|
||||
ARCH=$1
|
||||
PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)'
|
||||
|
||||
PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())'
|
||||
|
||||
for pkg in ${@:2}
|
||||
do
|
||||
Inform "Fetching... $pkg"
|
||||
XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg}
|
||||
XPATH=${XPATH/_ARCH_/$ARCH}
|
||||
Xpath_get $XPATH $TMP_PRIMARY
|
||||
PKG_PATH=$XPATH_RESULT
|
||||
|
||||
XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg}
|
||||
XPATH=${XPATH/_ARCH_/$ARCH}
|
||||
Xpath_get $XPATH $TMP_PRIMARY
|
||||
CHECKSUM=$XPATH_RESULT
|
||||
|
||||
PKG_URL=$TARGET_URL/$PKG_PATH
|
||||
PKG_FILE=$(basename $PKG_PATH)
|
||||
PKG_PATH=$TMPDIR/$PKG_FILE
|
||||
|
||||
Debug "Download $PKG_URL to $PKG_PATH"
|
||||
Fetch $PKG_URL $PKG_PATH true
|
||||
|
||||
echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
Error "Fail to fetch $PKG_URL to $PKG_PATH"
|
||||
Debug "Checksum = $CHECKSUM"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
Inform "Initialize arm base"
|
||||
fetch_tizen_pkgs_init standard base
|
||||
Inform "fetch common packages"
|
||||
fetch_tizen_pkgs armv7hl gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils
|
||||
Inform "fetch coreclr packages"
|
||||
fetch_tizen_pkgs armv7hl lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu
|
||||
Inform "fetch corefx packages"
|
||||
fetch_tizen_pkgs armv7hl libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel
|
||||
|
||||
Inform "Initialize standard unified"
|
||||
fetch_tizen_pkgs_init standard unified
|
||||
Inform "fetch corefx packages"
|
||||
fetch_tizen_pkgs armv7hl gssdp gssdp-devel tizen-release
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so
|
||||
--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900
|
||||
+++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900
|
||||
@@ -2,4 +2,4 @@
|
||||
Use the shared library, but some functions are only in
|
||||
the static library, so try that secondarily. */
|
||||
OUTPUT_FORMAT(elf32-littlearm)
|
||||
-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) )
|
||||
+GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-armhf.so.3 ) )
|
|
@ -1,71 +0,0 @@
|
|||
From e72c9d7ead60e3317bd6d1fade995c07021c947b Mon Sep 17 00:00:00 2001
|
||||
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
Date: Thu, 7 May 2015 13:25:04 -0400
|
||||
Subject: [PATCH] Fix: building probe providers with C++ compiler
|
||||
|
||||
Robert Daniels wrote:
|
||||
> > I'm attempting to use lttng userspace tracing with a C++ application
|
||||
> > on an ARM platform. I'm using GCC 4.8.4 on Linux 3.14 with the 2.6
|
||||
> > release of lttng. I've compiled lttng-modules, lttng-ust, and
|
||||
> > lttng-tools and have been able to get a simple test working with C
|
||||
> > code. When I attempt to run the hello.cxx test on my target it will
|
||||
> > segfault.
|
||||
>
|
||||
>
|
||||
> I spent a little time digging into this issue and finally discovered the
|
||||
> cause of my segfault with ARM C++ tracepoints.
|
||||
>
|
||||
> There is a struct called 'lttng_event' in ust-events.h which contains an
|
||||
> empty union 'u'. This was the cause of my issue. Under C, this empty union
|
||||
> compiles to a zero byte member while under C++ it compiles to a one byte
|
||||
> member, and in my case was four-byte aligned which caused my C++ code to
|
||||
> have the 'cds_list_head node' offset incorrectly by four bytes. This lead
|
||||
> to an incorrect linked list structure which caused my issue.
|
||||
>
|
||||
> Since this union is empty, I simply removed it from the struct and everything
|
||||
> worked correctly.
|
||||
>
|
||||
> I don't know the history or purpose behind this empty union so I'd like to
|
||||
> know if this is a safe fix. If it is I can submit a patch with the union
|
||||
> removed.
|
||||
|
||||
That's a very nice catch!
|
||||
|
||||
We do not support building tracepoint probe provider with
|
||||
g++ yet, as stated in lttng-ust(3):
|
||||
|
||||
"- Note for C++ support: although an application instrumented with
|
||||
tracepoints can be compiled with g++, tracepoint probes should be
|
||||
compiled with gcc (only tested with gcc so far)."
|
||||
|
||||
However, if it works fine with this fix, then I'm tempted to take it,
|
||||
especially because removing the empty union does not appear to affect
|
||||
the layout of struct lttng_event as seen from liblttng-ust, which must
|
||||
be compiled with a C compiler, and from probe providers compiled with
|
||||
a C compiler. So all we are changing is the layout of a probe provider
|
||||
compiled with a C++ compiler, which is anyway buggy at the moment,
|
||||
because it is not compatible with the layout expected by liblttng-ust
|
||||
compiled with a C compiler.
|
||||
|
||||
Reported-by: Robert Daniels <robert.daniels@vantagecontrols.com>
|
||||
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
|
||||
---
|
||||
include/lttng/ust-events.h | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/usr/include/lttng/ust-events.h b/usr/include/lttng/ust-events.h
|
||||
index 328a875..3d7a274 100644
|
||||
--- a/usr/include/lttng/ust-events.h
|
||||
+++ b/usr/include/lttng/ust-events.h
|
||||
@@ -407,8 +407,6 @@ struct lttng_event {
|
||||
void *_deprecated1;
|
||||
struct lttng_ctx *ctx;
|
||||
enum lttng_ust_instrumentation instrumentation;
|
||||
- union {
|
||||
- } u;
|
||||
struct cds_list_head node; /* Event list in session */
|
||||
struct cds_list_head _deprecated2;
|
||||
void *_deprecated3;
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
diff -u -r a/usr/include/urcu/uatomic/generic.h b/usr/include/urcu/uatomic/generic.h
|
||||
--- a/usr/include/urcu/uatomic/generic.h 2014-03-28 06:04:42.000000000 +0900
|
||||
+++ b/usr/include/urcu/uatomic/generic.h 2017-02-13 10:35:21.189927116 +0900
|
||||
@@ -65,17 +65,17 @@
|
||||
switch (len) {
|
||||
#ifdef UATOMIC_HAS_ATOMIC_BYTE
|
||||
case 1:
|
||||
- return __sync_val_compare_and_swap_1(addr, old, _new);
|
||||
+ return __sync_val_compare_and_swap_1((uint8_t *) addr, old, _new);
|
||||
#endif
|
||||
#ifdef UATOMIC_HAS_ATOMIC_SHORT
|
||||
case 2:
|
||||
- return __sync_val_compare_and_swap_2(addr, old, _new);
|
||||
+ return __sync_val_compare_and_swap_2((uint16_t *) addr, old, _new);
|
||||
#endif
|
||||
case 4:
|
||||
- return __sync_val_compare_and_swap_4(addr, old, _new);
|
||||
+ return __sync_val_compare_and_swap_4((uint32_t *) addr, old, _new);
|
||||
#if (CAA_BITS_PER_LONG == 64)
|
||||
case 8:
|
||||
- return __sync_val_compare_and_swap_8(addr, old, _new);
|
||||
+ return __sync_val_compare_and_swap_8((uint64_t *) addr, old, _new);
|
||||
#endif
|
||||
}
|
||||
_uatomic_link_error();
|
||||
@@ -100,20 +100,20 @@
|
||||
switch (len) {
|
||||
#ifdef UATOMIC_HAS_ATOMIC_BYTE
|
||||
case 1:
|
||||
- __sync_and_and_fetch_1(addr, val);
|
||||
+ __sync_and_and_fetch_1((uint8_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
#ifdef UATOMIC_HAS_ATOMIC_SHORT
|
||||
case 2:
|
||||
- __sync_and_and_fetch_2(addr, val);
|
||||
+ __sync_and_and_fetch_2((uint16_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
case 4:
|
||||
- __sync_and_and_fetch_4(addr, val);
|
||||
+ __sync_and_and_fetch_4((uint32_t *) addr, val);
|
||||
return;
|
||||
#if (CAA_BITS_PER_LONG == 64)
|
||||
case 8:
|
||||
- __sync_and_and_fetch_8(addr, val);
|
||||
+ __sync_and_and_fetch_8((uint64_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
@@ -139,20 +139,20 @@
|
||||
switch (len) {
|
||||
#ifdef UATOMIC_HAS_ATOMIC_BYTE
|
||||
case 1:
|
||||
- __sync_or_and_fetch_1(addr, val);
|
||||
+ __sync_or_and_fetch_1((uint8_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
#ifdef UATOMIC_HAS_ATOMIC_SHORT
|
||||
case 2:
|
||||
- __sync_or_and_fetch_2(addr, val);
|
||||
+ __sync_or_and_fetch_2((uint16_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
case 4:
|
||||
- __sync_or_and_fetch_4(addr, val);
|
||||
+ __sync_or_and_fetch_4((uint32_t *) addr, val);
|
||||
return;
|
||||
#if (CAA_BITS_PER_LONG == 64)
|
||||
case 8:
|
||||
- __sync_or_and_fetch_8(addr, val);
|
||||
+ __sync_or_and_fetch_8((uint64_t *) addr, val);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
@@ -180,17 +180,17 @@
|
||||
switch (len) {
|
||||
#ifdef UATOMIC_HAS_ATOMIC_BYTE
|
||||
case 1:
|
||||
- return __sync_add_and_fetch_1(addr, val);
|
||||
+ return __sync_add_and_fetch_1((uint8_t *) addr, val);
|
||||
#endif
|
||||
#ifdef UATOMIC_HAS_ATOMIC_SHORT
|
||||
case 2:
|
||||
- return __sync_add_and_fetch_2(addr, val);
|
||||
+ return __sync_add_and_fetch_2((uint16_t *) addr, val);
|
||||
#endif
|
||||
case 4:
|
||||
- return __sync_add_and_fetch_4(addr, val);
|
||||
+ return __sync_add_and_fetch_4((uint32_t *) addr, val);
|
||||
#if (CAA_BITS_PER_LONG == 64)
|
||||
case 8:
|
||||
- return __sync_add_and_fetch_8(addr, val);
|
||||
+ return __sync_add_and_fetch_8((uint64_t *) addr, val);
|
||||
#endif
|
||||
}
|
||||
_uatomic_link_error();
|
|
@ -1,11 +0,0 @@
|
|||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted universe
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted
|
||||
|
||||
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
||||
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted universe multiverse
|
|
@ -0,0 +1,2 @@
|
|||
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
|
||||
deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
|
|
@ -6,10 +6,10 @@ usage()
|
|||
{
|
||||
echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]"
|
||||
echo "BuildArch can be: arm(default), armel, arm64, x86"
|
||||
echo "CodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
|
||||
echo " for FreeBSD can be: freebsd11 or freebsd12."
|
||||
echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
|
||||
echo " for FreeBSD can be: freebsd11, freebsd12, freebsd13"
|
||||
echo " for illumos can be: illumos."
|
||||
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FReeBSD"
|
||||
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
|
||||
echo "--skipunmount - optional, will skip the unmount of rootfs folder."
|
||||
echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
|
||||
exit 1
|
||||
|
@ -32,10 +32,9 @@ __UbuntuPackages="build-essential"
|
|||
__AlpinePackages="alpine-base"
|
||||
__AlpinePackages+=" build-base"
|
||||
__AlpinePackages+=" linux-headers"
|
||||
__AlpinePackagesEdgeCommunity=" lldb-dev"
|
||||
__AlpinePackagesEdgeMain=" llvm10-libs"
|
||||
__AlpinePackagesEdgeMain+=" python3"
|
||||
__AlpinePackagesEdgeMain+=" libedit"
|
||||
__AlpinePackages+=" lldb-dev"
|
||||
__AlpinePackages+=" python3"
|
||||
__AlpinePackages+=" libedit"
|
||||
|
||||
# symlinks fixer
|
||||
__UbuntuPackages+=" symlinks"
|
||||
|
@ -61,13 +60,15 @@ __AlpinePackages+=" krb5-dev"
|
|||
__AlpinePackages+=" openssl-dev"
|
||||
__AlpinePackages+=" zlib-dev"
|
||||
|
||||
__FreeBSDBase="12.1-RELEASE"
|
||||
__FreeBSDBase="12.2-RELEASE"
|
||||
__FreeBSDPkg="1.12.0"
|
||||
__FreeBSDABI="12"
|
||||
__FreeBSDPackages="libunwind"
|
||||
__FreeBSDPackages+=" icu"
|
||||
__FreeBSDPackages+=" libinotify"
|
||||
__FreeBSDPackages+=" lttng-ust"
|
||||
__FreeBSDPackages+=" krb5"
|
||||
__FreeBSDPackages+=" terminfo-db"
|
||||
|
||||
__IllumosPackages="icu-64.2nb2"
|
||||
__IllumosPackages+=" mit-krb5-1.16.2nb4"
|
||||
|
@ -98,6 +99,15 @@ while :; do
|
|||
__AlpineArch=armv7
|
||||
__QEMUArch=arm
|
||||
;;
|
||||
armv6)
|
||||
__BuildArch=armv6
|
||||
__UbuntuArch=armhf
|
||||
__QEMUArch=arm
|
||||
__UbuntuRepo="http://raspbian.raspberrypi.org/raspbian/"
|
||||
__CodeName=buster
|
||||
__LLDB_Package="liblldb-6.0-dev"
|
||||
__Keyring="/usr/share/keyrings/raspbian-archive-keyring.gpg"
|
||||
;;
|
||||
arm64)
|
||||
__BuildArch=arm64
|
||||
__UbuntuArch=arm64
|
||||
|
@ -115,6 +125,8 @@ while :; do
|
|||
__UbuntuArch=s390x
|
||||
__UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
|
||||
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libunwind8-dev//')
|
||||
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp-dev//')
|
||||
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp5//')
|
||||
unset __LLDB_Package
|
||||
;;
|
||||
x86)
|
||||
|
@ -143,11 +155,6 @@ while :; do
|
|||
no-lldb)
|
||||
unset __LLDB_Package
|
||||
;;
|
||||
trusty) # Ubuntu 14.04
|
||||
if [ "$__CodeName" != "jessie" ]; then
|
||||
__CodeName=trusty
|
||||
fi
|
||||
;;
|
||||
xenial) # Ubuntu 16.04
|
||||
if [ "$__CodeName" != "jessie" ]; then
|
||||
__CodeName=xenial
|
||||
|
@ -178,8 +185,8 @@ while :; do
|
|||
__LLDB_Package="liblldb-6.0-dev"
|
||||
;;
|
||||
tizen)
|
||||
if [ "$__BuildArch" != "armel" ] && [ "$__BuildArch" != "arm64" ]; then
|
||||
echo "Tizen is available only for armel and arm64."
|
||||
if [ "$__BuildArch" != "arm" ] && [ "$__BuildArch" != "armel" ] && [ "$__BuildArch" != "arm64" ]; then
|
||||
echo "Tizen is available only for arm, armel and arm64."
|
||||
usage;
|
||||
exit 1;
|
||||
fi
|
||||
|
@ -187,29 +194,34 @@ while :; do
|
|||
__UbuntuRepo=
|
||||
__Tizen=tizen
|
||||
;;
|
||||
alpine|alpine3.9)
|
||||
__CodeName=alpine
|
||||
__UbuntuRepo=
|
||||
__AlpineVersion=3.9
|
||||
;;
|
||||
alpine3.13)
|
||||
alpine|alpine3.13)
|
||||
__CodeName=alpine
|
||||
__UbuntuRepo=
|
||||
__AlpineVersion=3.13
|
||||
# Alpine 3.13 has all the packages we need in the 3.13 repository
|
||||
__AlpinePackages+=$__AlpinePackagesEdgeCommunity
|
||||
__AlpinePackagesEdgeCommunity=
|
||||
__AlpinePackages+=$__AlpinePackagesEdgeMain
|
||||
__AlpinePackagesEdgeMain=
|
||||
__AlpinePackages+=" llvm10-libs"
|
||||
;;
|
||||
alpine3.14)
|
||||
__CodeName=alpine
|
||||
__UbuntuRepo=
|
||||
__AlpineVersion=3.14
|
||||
__AlpinePackages+=" llvm11-libs"
|
||||
;;
|
||||
freebsd11)
|
||||
__FreeBSDBase="11.3-RELEASE"
|
||||
__FreeBSDABI="11"
|
||||
;&
|
||||
freebsd12)
|
||||
__CodeName=freebsd
|
||||
__BuildArch=x64
|
||||
__SkipUnmount=1
|
||||
;;
|
||||
freebsd13)
|
||||
__CodeName=freebsd
|
||||
__FreeBSDBase="13.0-RELEASE"
|
||||
__FreeBSDABI="13"
|
||||
__BuildArch=x64
|
||||
__SkipUnmount=1
|
||||
;;
|
||||
illumos)
|
||||
__CodeName=illumos
|
||||
__BuildArch=x64
|
||||
|
@ -233,6 +245,12 @@ while :; do
|
|||
shift
|
||||
done
|
||||
|
||||
if [ -e "$__Keyring" ]; then
|
||||
__Keyring="--keyring=$__Keyring"
|
||||
else
|
||||
__Keyring=""
|
||||
fi
|
||||
|
||||
if [ "$__BuildArch" == "armel" ]; then
|
||||
__LLDB_Package="lldb-3.5-dev"
|
||||
fi
|
||||
|
@ -270,26 +288,12 @@ if [[ "$__CodeName" == "alpine" ]]; then
|
|||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackages
|
||||
|
||||
if [[ -n "$__AlpinePackagesEdgeMain" ]]; then
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackagesEdgeMain
|
||||
fi
|
||||
|
||||
if [[ -n "$__AlpinePackagesEdgeCommunity" ]]; then
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/community \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackagesEdgeCommunity
|
||||
fi
|
||||
|
||||
rm -r $__ApkToolsDir
|
||||
elif [[ "$__CodeName" == "freebsd" ]]; then
|
||||
mkdir -p $__RootfsDir/usr/local/etc
|
||||
JOBS="$(getconf _NPROCESSORS_ONLN)"
|
||||
wget -O - https://download.freebsd.org/ftp/releases/amd64/${__FreeBSDBase}/base.txz | tar -C $__RootfsDir -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version
|
||||
# For now, ask for 11 ABI even on 12. This can be revisited later.
|
||||
echo "ABI = \"FreeBSD:11:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf
|
||||
echo "ABI = \"FreeBSD:${__FreeBSDABI}:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf
|
||||
echo "FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > ${__RootfsDir}/etc/pkg/FreeBSD.conf
|
||||
mkdir -p $__RootfsDir/tmp
|
||||
# get and build package manager
|
||||
|
@ -297,7 +301,7 @@ elif [[ "$__CodeName" == "freebsd" ]]; then
|
|||
cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
|
||||
# needed for install to succeed
|
||||
mkdir -p $__RootfsDir/host/etc
|
||||
./autogen.sh && ./configure --prefix=$__RootfsDir/host && make && make install
|
||||
./autogen.sh && ./configure --prefix=$__RootfsDir/host && make -j "$JOBS" && make install
|
||||
rm -rf $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
|
||||
# install packages we need.
|
||||
INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update
|
||||
|
@ -348,7 +352,7 @@ elif [[ "$__CodeName" == "illumos" ]]; then
|
|||
wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h
|
||||
wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h
|
||||
elif [[ -n $__CodeName ]]; then
|
||||
qemu-debootstrap --arch $__UbuntuArch $__CodeName $__RootfsDir $__UbuntuRepo
|
||||
qemu-debootstrap $__Keyring --arch $__UbuntuArch $__CodeName $__RootfsDir $__UbuntuRepo
|
||||
cp $__CrossDir/$__BuildArch/sources.list.$__CodeName $__RootfsDir/etc/apt/sources.list
|
||||
chroot $__RootfsDir apt-get update
|
||||
chroot $__RootfsDir apt-get -f -y install
|
||||
|
@ -360,13 +364,6 @@ elif [[ -n $__CodeName ]]; then
|
|||
umount $__RootfsDir/* || true
|
||||
fi
|
||||
|
||||
if [[ "$__BuildArch" == "arm" && "$__CodeName" == "trusty" ]]; then
|
||||
pushd $__RootfsDir
|
||||
patch -p1 < $__CrossDir/$__BuildArch/trusty.patch
|
||||
patch -p1 < $__CrossDir/$__BuildArch/trusty-lttng-2.4.patch
|
||||
popd
|
||||
fi
|
||||
|
||||
if [[ "$__BuildArch" == "armel" && "$__CodeName" == "jessie" ]]; then
|
||||
pushd $__RootfsDir
|
||||
patch -p1 < $__CrossDir/$__BuildArch/armel.jessie.patch
|
||||
|
|
|
@ -3,18 +3,26 @@ set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
|
|||
set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})
|
||||
if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
|
||||
set(CMAKE_SYSTEM_NAME FreeBSD)
|
||||
set(FREEBSD 1)
|
||||
elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc)
|
||||
set(CMAKE_SYSTEM_NAME SunOS)
|
||||
set(ILLUMOS 1)
|
||||
else()
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(LINUX 1)
|
||||
endif()
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
if(EXISTS ${CROSS_ROOTFS}/etc/tizen-release)
|
||||
set(TIZEN 1)
|
||||
elseif(EXISTS ${CROSS_ROOTFS}/android_platform)
|
||||
set(ANDROID 1)
|
||||
endif()
|
||||
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
set(CMAKE_SYSTEM_PROCESSOR armv7l)
|
||||
set(TOOLCHAIN "arm-linux-gnueabi")
|
||||
if("$ENV{__DistroRid}" MATCHES "tizen.*")
|
||||
if(TIZEN)
|
||||
set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "arm")
|
||||
|
@ -26,6 +34,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm")
|
|||
else()
|
||||
set(TOOLCHAIN "arm-linux-gnueabihf")
|
||||
endif()
|
||||
if(TIZEN)
|
||||
set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl)
|
||||
|
@ -33,7 +44,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
|||
else()
|
||||
set(TOOLCHAIN "aarch64-linux-gnu")
|
||||
endif()
|
||||
if("$ENV{__DistroRid}" MATCHES "tizen.*")
|
||||
if(TIZEN)
|
||||
set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
|
||||
|
@ -42,9 +53,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "s390x")
|
|||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
set(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
set(TOOLCHAIN "i686-linux-gnu")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
elseif (FREEBSD)
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
set(triple "x86_64-unknown-freebsd11")
|
||||
set(triple "x86_64-unknown-freebsd12")
|
||||
elseif (ILLUMOS)
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
set(TOOLCHAIN "x86_64-illumos")
|
||||
|
@ -57,7 +68,11 @@ if(DEFINED ENV{TOOLCHAIN})
|
|||
endif()
|
||||
|
||||
# Specify include paths
|
||||
if(DEFINED TIZEN_TOOLCHAIN)
|
||||
if(TIZEN)
|
||||
if(TARGET_ARCH_NAME STREQUAL "arm")
|
||||
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
|
||||
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf)
|
||||
endif()
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
|
||||
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi)
|
||||
|
@ -68,7 +83,7 @@ if(DEFINED TIZEN_TOOLCHAIN)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if("$ENV{__DistroRid}" MATCHES "android.*")
|
||||
if(ANDROID)
|
||||
if(TARGET_ARCH_NAME STREQUAL "arm")
|
||||
set(ANDROID_ABI armeabi-v7a)
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
||||
|
@ -76,7 +91,9 @@ if("$ENV{__DistroRid}" MATCHES "android.*")
|
|||
endif()
|
||||
|
||||
# extract platform number required by the NDK's toolchain
|
||||
string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "$ENV{__DistroRid}")
|
||||
file(READ "${CROSS_ROOTFS}/android_platform" RID_FILE_CONTENTS)
|
||||
string(REPLACE "RID=" "" ANDROID_RID "${RID_FILE_CONTENTS}")
|
||||
string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "${ANDROID_RID}")
|
||||
|
||||
set(ANDROID_TOOLCHAIN clang)
|
||||
set(FEATURE_EVENT_TRACE 0) # disable event trace as there is no lttng-ust package in termux repository
|
||||
|
@ -85,12 +102,15 @@ if("$ENV{__DistroRid}" MATCHES "android.*")
|
|||
|
||||
# include official NDK toolchain script
|
||||
include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
elseif(FREEBSD)
|
||||
# we cross-compile by instructing clang
|
||||
set(CMAKE_C_COMPILER_TARGET ${triple})
|
||||
set(CMAKE_CXX_COMPILER_TARGET ${triple})
|
||||
set(CMAKE_ASM_COMPILER_TARGET ${triple})
|
||||
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld")
|
||||
elseif(ILLUMOS)
|
||||
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
|
||||
|
||||
|
@ -138,24 +158,24 @@ function(add_toolchain_linker_flag Flag)
|
|||
if (NOT Config STREQUAL "")
|
||||
set(CONFIG_SUFFIX "_${Config}")
|
||||
endif()
|
||||
set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
|
||||
set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
|
||||
set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
|
||||
set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if(LINUX)
|
||||
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
|
||||
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}")
|
||||
endif()
|
||||
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
|
||||
if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
|
||||
if(TIZEN)
|
||||
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
|
||||
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
|
||||
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
|
||||
if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
|
||||
if(TIZEN)
|
||||
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
|
||||
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64")
|
||||
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64")
|
||||
|
@ -174,7 +194,7 @@ endif()
|
|||
|
||||
# Specify compile options
|
||||
|
||||
if((TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64|s390x)$" AND NOT "$ENV{__DistroRid}" MATCHES "android.*") OR ILLUMOS)
|
||||
if((TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64|s390x)$" AND NOT ANDROID) OR ILLUMOS)
|
||||
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
|
||||
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
|
||||
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
|
||||
|
@ -201,8 +221,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
|||
add_compile_options(-Wno-error=unused-command-line-argument)
|
||||
endif()
|
||||
|
||||
if(DEFINED TIZEN_TOOLCHAIN)
|
||||
if(TARGET_ARCH_NAME MATCHES "^(armel|arm64)$")
|
||||
if(TIZEN)
|
||||
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$")
|
||||
add_compile_options(-Wno-deprecated-declarations) # compile-time option
|
||||
add_compile_options(-D__extern_always_inline=inline) # compile-time option
|
||||
endif()
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
|
|
@ -53,7 +53,7 @@ fi
|
|||
function InstallDarcCli {
|
||||
local darc_cli_package_name="microsoft.dotnet.darc"
|
||||
|
||||
InitializeDotNetCli
|
||||
InitializeDotNetCli true
|
||||
local dotnet_root=$_InitializeDotNetCli
|
||||
|
||||
if [ -z "$toolpath" ]; then
|
||||
|
|
|
@ -55,6 +55,9 @@ case $cpuname in
|
|||
aarch64)
|
||||
buildarch=arm64
|
||||
;;
|
||||
loongarch64)
|
||||
buildarch=loongarch64
|
||||
;;
|
||||
amd64|x86_64)
|
||||
buildarch=x64
|
||||
;;
|
||||
|
@ -70,7 +73,7 @@ case $cpuname in
|
|||
;;
|
||||
esac
|
||||
|
||||
dotnetRoot="$repo_root/.dotnet"
|
||||
dotnetRoot="${repo_root}.dotnet"
|
||||
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
|
||||
dotnetRoot="$dotnetRoot/$architecture"
|
||||
fi
|
||||
|
|
|
@ -25,8 +25,15 @@ Push-Location "$SourcesDirectory" # push location for Resolve-Path -Relative to
|
|||
|
||||
# Template files
|
||||
$jsonFiles = @()
|
||||
$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\en\..+\.json" } # .NET templating pattern
|
||||
$jsonFiles += Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
|
||||
$jsonTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\.+\.en\.json" } # .NET templating pattern
|
||||
$jsonTemplateFiles | ForEach-Object {
|
||||
$null = $_.Name -Match "(.+)\.[\w-]+\.json" # matches '[filename].[langcode].json
|
||||
|
||||
$destinationFile = "$($_.Directory.FullName)\$($Matches.1).json"
|
||||
$jsonFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
|
||||
}
|
||||
|
||||
$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
|
||||
|
||||
$xlfFiles = @()
|
||||
|
||||
|
@ -44,7 +51,7 @@ $langXlfFiles | ForEach-Object {
|
|||
$xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
|
||||
}
|
||||
|
||||
$locFiles = $jsonFiles + $xlfFiles
|
||||
$locFiles = $jsonFiles + $jsonWinformsTemplateFiles + $xlfFiles
|
||||
|
||||
$locJson = @{
|
||||
Projects = @(
|
||||
|
|
|
@ -10,7 +10,7 @@ force=false
|
|||
download_retries=5
|
||||
retry_wait_time_seconds=30
|
||||
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
|
||||
declare -A native_assets
|
||||
declare -a native_assets
|
||||
|
||||
. $scriptroot/pipeline-logging-functions.sh
|
||||
. $scriptroot/native/common-library.sh
|
||||
|
|
|
@ -45,11 +45,11 @@ function SetupCredProvider {
|
|||
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
|
||||
# feeds successfully
|
||||
|
||||
$nugetConfigPath = "$RepoRoot\NuGet.config"
|
||||
$nugetConfigPath = Join-Path $RepoRoot "NuGet.config"
|
||||
|
||||
if (-Not (Test-Path -Path $nugetConfigPath)) {
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!'
|
||||
ExitWithExitCode 1
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$endpoints = New-Object System.Collections.ArrayList
|
||||
|
@ -85,7 +85,7 @@ function SetupCredProvider {
|
|||
|
||||
#Workaround for https://github.com/microsoft/msbuild/issues/4430
|
||||
function InstallDotNetSdkAndRestoreArcade {
|
||||
$dotnetTempDir = "$RepoRoot\dotnet"
|
||||
$dotnetTempDir = Join-Path $RepoRoot "dotnet"
|
||||
$dotnetSdkVersion="2.1.507" # After experimentation we know this version works when restoring the SDK (compared to 3.0.*)
|
||||
$dotnet = "$dotnetTempDir\dotnet.exe"
|
||||
$restoreProjPath = "$PSScriptRoot\restore.proj"
|
||||
|
|
|
@ -39,7 +39,7 @@ function SetupCredProvider {
|
|||
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
|
||||
# feeds successfully
|
||||
|
||||
local nugetConfigPath="$repo_root/NuGet.config"
|
||||
local nugetConfigPath="{$repo_root}NuGet.config"
|
||||
|
||||
if [ ! "$nugetConfigPath" ]; then
|
||||
Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
|
||||
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
|
|
|
@ -6,6 +6,7 @@ Param(
|
|||
[switch] $ci,
|
||||
[switch] $prepareMachine,
|
||||
[switch] $excludePrereleaseVS,
|
||||
[string] $msbuildEngine = $null,
|
||||
[Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs
|
||||
)
|
||||
|
||||
|
|
|
@ -276,7 +276,8 @@ function Get-MachineArchitecture {
|
|||
}
|
||||
if (($ProcessorArchitecture -Eq "AMD64") -Or
|
||||
($ProcessorArchitecture -Eq "IA64") -Or
|
||||
($ProcessorArchitecture -Eq "ARM64")) {
|
||||
($ProcessorArchitecture -Eq "ARM64") -Or
|
||||
($ProcessorArchitecture -Eq "LOONGARCH64")) {
|
||||
return "x64"
|
||||
}
|
||||
return "x86"
|
||||
|
|
|
@ -148,8 +148,12 @@ function NewScriptShim {
|
|||
fi
|
||||
|
||||
if [[ ! -f $tool_file_path ]]; then
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
|
||||
return 1
|
||||
# try to see if the path is lower cased
|
||||
tool_file_path="$(echo $tool_file_path | tr "[:upper:]" "[:lower:]")"
|
||||
if [[ ! -f $tool_file_path ]]; then
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
local shim_contents=$'#!/usr/bin/env bash\n'
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# This file locates the native compiler with the given name and version and sets the environment variables to locate it.
|
||||
#
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
|
||||
# resolve $SOURCE until the file is no longer a symlink
|
||||
while [[ -h $source ]]; do
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
source="$(readlink "$source")"
|
||||
|
||||
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||
# symlink file was located
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
if [ $# -lt 0 ]
|
||||
then
|
||||
echo "Usage..."
|
||||
echo "find-native-compiler.sh <compiler> <compiler major version> <compiler minor version>"
|
||||
echo "Specify the name of compiler (clang or gcc)."
|
||||
echo "Specify the major version of compiler."
|
||||
echo "Specify the minor version of compiler."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. $scriptroot/../pipeline-logging-functions.sh
|
||||
|
||||
compiler="$1"
|
||||
cxxCompiler="$compiler++"
|
||||
majorVersion="$2"
|
||||
minorVersion="$3"
|
||||
|
||||
if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi
|
||||
|
||||
check_version_exists() {
|
||||
desired_version=-1
|
||||
|
||||
# Set up the environment to be used for building with the desired compiler.
|
||||
if command -v "$compiler-$1.$2" > /dev/null; then
|
||||
desired_version="-$1.$2"
|
||||
elif command -v "$compiler$1$2" > /dev/null; then
|
||||
desired_version="$1$2"
|
||||
elif command -v "$compiler-$1$2" > /dev/null; then
|
||||
desired_version="-$1$2"
|
||||
fi
|
||||
|
||||
echo "$desired_version"
|
||||
}
|
||||
|
||||
if [ -z "$CLR_CC" ]; then
|
||||
|
||||
# Set default versions
|
||||
if [ -z "$majorVersion" ]; then
|
||||
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
|
||||
if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
|
||||
elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
parts=(${version//./ })
|
||||
desired_version="$(check_version_exists "${parts[0]}" "${parts[1]}")"
|
||||
if [ "$desired_version" != "-1" ]; then majorVersion="${parts[0]}"; break; fi
|
||||
done
|
||||
|
||||
if [ -z "$majorVersion" ]; then
|
||||
if command -v "$compiler" > /dev/null; then
|
||||
if [ "$(uname)" != "Darwin" ]; then
|
||||
Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH."
|
||||
fi
|
||||
export CC="$(command -v "$compiler")"
|
||||
export CXX="$(command -v "$cxxCompiler")"
|
||||
else
|
||||
Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then
|
||||
if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then
|
||||
if command -v "$compiler" > /dev/null; then
|
||||
Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
|
||||
export CC="$(command -v "$compiler")"
|
||||
export CXX="$(command -v "$cxxCompiler")"
|
||||
else
|
||||
Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
desired_version="$(check_version_exists "$majorVersion" "$minorVersion")"
|
||||
if [ "$desired_version" = "-1" ]; then
|
||||
Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$CC" ]; then
|
||||
export CC="$(command -v "$compiler$desired_version")"
|
||||
export CXX="$(command -v "$cxxCompiler$desired_version")"
|
||||
if [ -z "$CXX" ]; then export CXX="$(command -v "$cxxCompiler")"; fi
|
||||
fi
|
||||
else
|
||||
if [ ! -f "$CLR_CC" ]; then
|
||||
Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist"
|
||||
exit 1
|
||||
fi
|
||||
export CC="$CLR_CC"
|
||||
export CXX="$CLR_CXX"
|
||||
fi
|
||||
|
||||
if [ -z "$CC" ]; then
|
||||
Write-PipelineTelemetryError -category "Build" "Unable to find $compiler."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export CCC_CC="$CC"
|
||||
export CCC_CXX="$CXX"
|
||||
export SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
|
|
@ -0,0 +1,144 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables
|
||||
#
|
||||
# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here!
|
||||
|
||||
if [[ "$#" -lt 3 ]]; then
|
||||
echo "Usage..."
|
||||
echo "init-compiler.sh <script directory> <Architecture> <compiler>"
|
||||
echo "Specify the script directory."
|
||||
echo "Specify the target architecture."
|
||||
echo "Specify the name of compiler (clang or gcc)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nativescriptroot="$1"
|
||||
build_arch="$2"
|
||||
compiler="$3"
|
||||
|
||||
case "$compiler" in
|
||||
clang*|-clang*|--clang*)
|
||||
# clangx.y or clang-x.y
|
||||
version="$(echo "$compiler" | tr -d '[:alpha:]-=')"
|
||||
parts=(${version//./ })
|
||||
majorVersion="${parts[0]}"
|
||||
minorVersion="${parts[1]}"
|
||||
if [[ -z "$minorVersion" && "$majorVersion" -le 6 ]]; then
|
||||
minorVersion=0;
|
||||
fi
|
||||
compiler=clang
|
||||
;;
|
||||
|
||||
gcc*|-gcc*|--gcc*)
|
||||
# gccx.y or gcc-x.y
|
||||
version="$(echo "$compiler" | tr -d '[:alpha:]-=')"
|
||||
parts=(${version//./ })
|
||||
majorVersion="${parts[0]}"
|
||||
minorVersion="${parts[1]}"
|
||||
compiler=gcc
|
||||
;;
|
||||
esac
|
||||
|
||||
cxxCompiler="$compiler++"
|
||||
|
||||
. "$nativescriptroot"/../pipeline-logging-functions.sh
|
||||
|
||||
# clear the existing CC and CXX from environment
|
||||
CC=
|
||||
CXX=
|
||||
LDFLAGS=
|
||||
|
||||
if [[ "$compiler" == "gcc" ]]; then cxxCompiler="g++"; fi
|
||||
|
||||
check_version_exists() {
|
||||
desired_version=-1
|
||||
|
||||
# Set up the environment to be used for building with the desired compiler.
|
||||
if command -v "$compiler-$1.$2" > /dev/null; then
|
||||
desired_version="-$1.$2"
|
||||
elif command -v "$compiler$1$2" > /dev/null; then
|
||||
desired_version="$1$2"
|
||||
elif command -v "$compiler-$1$2" > /dev/null; then
|
||||
desired_version="-$1$2"
|
||||
fi
|
||||
|
||||
echo "$desired_version"
|
||||
}
|
||||
|
||||
if [[ -z "$CLR_CC" ]]; then
|
||||
|
||||
# Set default versions
|
||||
if [[ -z "$majorVersion" ]]; then
|
||||
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
|
||||
if [[ "$compiler" == "clang" ]]; then versions=( 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
|
||||
elif [[ "$compiler" == "gcc" ]]; then versions=( 12 11 10 9 8 7 6 5 4.9 ); fi
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
parts=(${version//./ })
|
||||
desired_version="$(check_version_exists "${parts[0]}" "${parts[1]}")"
|
||||
if [[ "$desired_version" != "-1" ]]; then majorVersion="${parts[0]}"; break; fi
|
||||
done
|
||||
|
||||
if [[ -z "$majorVersion" ]]; then
|
||||
if command -v "$compiler" > /dev/null; then
|
||||
if [[ "$(uname)" != "Darwin" ]]; then
|
||||
Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH."
|
||||
fi
|
||||
CC="$(command -v "$compiler")"
|
||||
CXX="$(command -v "$cxxCompiler")"
|
||||
else
|
||||
Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [[ "$compiler" == "clang" && "$majorVersion" -lt 5 ]]; then
|
||||
if [[ "$build_arch" == "arm" || "$build_arch" == "armel" ]]; then
|
||||
if command -v "$compiler" > /dev/null; then
|
||||
Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
|
||||
CC="$(command -v "$compiler")"
|
||||
CXX="$(command -v "$cxxCompiler")"
|
||||
else
|
||||
Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
desired_version="$(check_version_exists "$majorVersion" "$minorVersion")"
|
||||
if [[ "$desired_version" == "-1" ]]; then
|
||||
Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="$(command -v "$compiler$desired_version")"
|
||||
CXX="$(command -v "$cxxCompiler$desired_version")"
|
||||
if [[ -z "$CXX" ]]; then CXX="$(command -v "$cxxCompiler")"; fi
|
||||
fi
|
||||
else
|
||||
if [[ ! -f "$CLR_CC" ]]; then
|
||||
Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist"
|
||||
exit 1
|
||||
fi
|
||||
CC="$CLR_CC"
|
||||
CXX="$CLR_CXX"
|
||||
fi
|
||||
|
||||
if [[ -z "$CC" ]]; then
|
||||
Write-PipelineTelemetryError -category "Build" "Unable to find $compiler."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Only lld version >= 9 can be considered stable
|
||||
if [[ "$compiler" == "clang" && "$majorVersion" -ge 9 ]]; then
|
||||
if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
|
||||
LDFLAGS="-fuse-ld=lld"
|
||||
fi
|
||||
fi
|
||||
|
||||
SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
|
||||
|
||||
export CC CXX LDFLAGS SCAN_BUILD_COMMAND
|
|
@ -17,10 +17,16 @@ $global:RepoFiles = @{}
|
|||
$MaxParallelJobs = 16
|
||||
|
||||
$MaxRetries = 5
|
||||
$RetryWaitTimeInSeconds = 30
|
||||
|
||||
# Wait time between check for system load
|
||||
$SecondsBetweenLoadChecks = 10
|
||||
|
||||
if (!$InputPath -or !(Test-Path $InputPath)){
|
||||
Write-Host "No files to validate."
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
|
||||
$ValidatePackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a Symbols.NuGet package
|
||||
|
@ -99,21 +105,25 @@ $ValidatePackage = {
|
|||
$Status = 200
|
||||
$Cache = $using:RepoFiles
|
||||
|
||||
$totalRetries = 0
|
||||
$attempts = 0
|
||||
|
||||
while ($totalRetries -lt $using:MaxRetries) {
|
||||
while ($attempts -lt $using:MaxRetries) {
|
||||
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' -or $Uri.Host -match 'githubusercontent')) {
|
||||
if ($Link -match "submodules") {
|
||||
# Skip submodule links until sourcelink properly handles submodules
|
||||
$Status = 200
|
||||
}
|
||||
elseif ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
|
||||
# Only GitHub links are valid
|
||||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
|
||||
}
|
||||
else {
|
||||
# If it's not a github link, we want to break out of the loop and not retry.
|
||||
$Status = 0
|
||||
$totalRetries = $using:MaxRetries
|
||||
$attempts = $using:MaxRetries
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
@ -123,9 +133,15 @@ $ValidatePackage = {
|
|||
}
|
||||
|
||||
if ($Status -ne 200) {
|
||||
$totalRetries++
|
||||
$attempts++
|
||||
|
||||
if ($totalRetries -ge $using:MaxRetries) {
|
||||
if ($attempts -lt $using:MaxRetries)
|
||||
{
|
||||
$attemptsLeft = $using:MaxRetries - $attempts
|
||||
Write-Warning "Download failed, $attemptsLeft attempts remaining, will retry in $using:RetryWaitTimeInSeconds seconds"
|
||||
Start-Sleep -Seconds $using:RetryWaitTimeInSeconds
|
||||
}
|
||||
else {
|
||||
if ($NumFailedLinks -eq 0) {
|
||||
if ($FailedFiles.Value -eq 0) {
|
||||
Write-Host
|
||||
|
|
|
@ -4,9 +4,11 @@ param(
|
|||
[Parameter(Mandatory = $true)][string] $DotnetSymbolVersion, # Version of dotnet symbol to use
|
||||
[Parameter(Mandatory = $false)][switch] $CheckForWindowsPdbs, # If we should check for the existence of windows pdbs in addition to portable PDBs
|
||||
[Parameter(Mandatory = $false)][switch] $ContinueOnError, # If we should keep checking symbols after an error
|
||||
[Parameter(Mandatory = $false)][switch] $Clean # Clean extracted symbols directory after checking symbols
|
||||
[Parameter(Mandatory = $false)][switch] $Clean, # Clean extracted symbols directory after checking symbols
|
||||
[Parameter(Mandatory = $false)][string] $SymbolExclusionFile # Exclude the symbols in the file from publishing to symbol server
|
||||
)
|
||||
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
# Maximum number of jobs to run in parallel
|
||||
$MaxParallelJobs = 16
|
||||
|
||||
|
@ -25,14 +27,28 @@ if ($CheckForWindowsPdbs) {
|
|||
$WindowsPdbVerificationParam = "--windows-pdbs"
|
||||
}
|
||||
|
||||
$ExclusionSet = New-Object System.Collections.Generic.HashSet[string];
|
||||
|
||||
if (!$InputPath -or !(Test-Path $InputPath)){
|
||||
Write-Host "No symbols to validate."
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
|
||||
#Check if the path exists
|
||||
if ($SymbolExclusionFile -and (Test-Path $SymbolExclusionFile)){
|
||||
[string[]]$Exclusions = Get-Content "$SymbolExclusionFile"
|
||||
$Exclusions | foreach { if($_ -and $_.Trim()){$ExclusionSet.Add($_)} }
|
||||
}
|
||||
else{
|
||||
Write-Host "Symbol Exclusion file does not exists. No symbols to exclude."
|
||||
}
|
||||
|
||||
$CountMissingSymbols = {
|
||||
param(
|
||||
[string] $PackagePath, # Path to a NuGet package
|
||||
[string] $WindowsPdbVerificationParam # If we should check for the existence of windows pdbs in addition to portable PDBs
|
||||
)
|
||||
|
||||
. $using:PSScriptRoot\..\tools.ps1
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
Write-Host "Validating $PackagePath "
|
||||
|
@ -118,17 +134,17 @@ $CountMissingSymbols = {
|
|||
# Save the output and get diagnostic output
|
||||
$output = & $dotnetSymbolExe --symbols --modules $WindowsPdbVerificationParam $TargetServerParam $FullPath -o $SymbolsPath --diagnostics | Out-String
|
||||
|
||||
if (Test-Path $PdbPath) {
|
||||
return 'PDB'
|
||||
if ((Test-Path $PdbPath) -and (Test-path $SymbolPath)) {
|
||||
return 'Module and PDB for Module'
|
||||
}
|
||||
elseif (Test-Path $NGenPdb) {
|
||||
return 'NGen PDB'
|
||||
elseif ((Test-Path $NGenPdb) -and (Test-Path $PdbPath) -and (Test-Path $SymbolPath)) {
|
||||
return 'Dll, PDB and NGen PDB'
|
||||
}
|
||||
elseif (Test-Path $SODbg) {
|
||||
return 'DBG for SO'
|
||||
elseif ((Test-Path $SODbg) -and (Test-Path $SymbolPath)) {
|
||||
return 'So and DBG for SO'
|
||||
}
|
||||
elseif (Test-Path $DylibDwarf) {
|
||||
return 'Dwarf for Dylib'
|
||||
elseif ((Test-Path $DylibDwarf) -and (Test-Path $SymbolPath)) {
|
||||
return 'Dylib and Dwarf for Dylib'
|
||||
}
|
||||
elseif (Test-Path $SymbolPath) {
|
||||
return 'Module'
|
||||
|
@ -142,37 +158,44 @@ $CountMissingSymbols = {
|
|||
return $null
|
||||
}
|
||||
|
||||
$FileGuid = New-Guid
|
||||
$ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid
|
||||
|
||||
$SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault `
|
||||
-FullPath $FileName `
|
||||
-TargetServerParam '--microsoft-symbol-server' `
|
||||
-SymbolsPath "$ExpandedSymbolsPath-msdl" `
|
||||
-WindowsPdbVerificationParam $WindowsPdbVerificationParam
|
||||
$SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault `
|
||||
-FullPath $FileName `
|
||||
-TargetServerParam '--internal-server' `
|
||||
-SymbolsPath "$ExpandedSymbolsPath-symweb" `
|
||||
-WindowsPdbVerificationParam $WindowsPdbVerificationParam
|
||||
|
||||
Write-Host -NoNewLine "`t Checking file " $FileName "... "
|
||||
|
||||
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
|
||||
Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)"
|
||||
$FileRelativePath = $FileName.Replace("$ExtractPath\", "")
|
||||
if (($($using:ExclusionSet) -ne $null) -and ($($using:ExclusionSet).Contains($FileRelativePath) -or ($($using:ExclusionSet).Contains($FileRelativePath.Replace("\", "/"))))){
|
||||
Write-Host "Skipping $FileName from symbol validation"
|
||||
}
|
||||
else {
|
||||
$MissingSymbols++
|
||||
|
||||
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
|
||||
Write-Host 'No symbols found on MSDL or SymWeb!'
|
||||
else {
|
||||
$FileGuid = New-Guid
|
||||
$ExpandedSymbolsPath = Join-Path -Path $SymbolsPath -ChildPath $FileGuid
|
||||
|
||||
$SymbolsOnMSDL = & $FirstMatchingSymbolDescriptionOrDefault `
|
||||
-FullPath $FileName `
|
||||
-TargetServerParam '--microsoft-symbol-server' `
|
||||
-SymbolsPath "$ExpandedSymbolsPath-msdl" `
|
||||
-WindowsPdbVerificationParam $WindowsPdbVerificationParam
|
||||
$SymbolsOnSymWeb = & $FirstMatchingSymbolDescriptionOrDefault `
|
||||
-FullPath $FileName `
|
||||
-TargetServerParam '--internal-server' `
|
||||
-SymbolsPath "$ExpandedSymbolsPath-symweb" `
|
||||
-WindowsPdbVerificationParam $WindowsPdbVerificationParam
|
||||
|
||||
Write-Host -NoNewLine "`t Checking file " $FileName "... "
|
||||
|
||||
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
|
||||
Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)"
|
||||
}
|
||||
else {
|
||||
if ($SymbolsOnMSDL -eq $null) {
|
||||
Write-Host 'No symbols found on MSDL!'
|
||||
$MissingSymbols++
|
||||
|
||||
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
|
||||
Write-Host 'No symbols found on MSDL or SymWeb!'
|
||||
}
|
||||
else {
|
||||
Write-Host 'No symbols found on SymWeb!'
|
||||
if ($SymbolsOnMSDL -eq $null) {
|
||||
Write-Host 'No symbols found on MSDL!'
|
||||
}
|
||||
else {
|
||||
Write-Host 'No symbols found on SymWeb!'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ function Print-Usage() {
|
|||
function Build([string]$target) {
|
||||
$logSuffix = if ($target -eq 'Execute') { '' } else { ".$target" }
|
||||
$log = Join-Path $LogDir "$task$logSuffix.binlog"
|
||||
$outputPath = Join-Path $ToolsetDir "$task\\"
|
||||
$outputPath = Join-Path $ToolsetDir "$task\"
|
||||
|
||||
MSBuild $taskProject `
|
||||
/bl:$log `
|
||||
|
@ -64,7 +64,7 @@ try {
|
|||
$GlobalJson.tools | Add-Member -Name "vs" -Value (ConvertFrom-Json "{ `"version`": `"16.5`" }") -MemberType NoteProperty
|
||||
}
|
||||
if( -not ($GlobalJson.tools.PSObject.Properties.Name -match "xcopy-msbuild" )) {
|
||||
$GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "16.8.0-preview3" -MemberType NoteProperty
|
||||
$GlobalJson.tools | Add-Member -Name "xcopy-msbuild" -Value "16.10.0-preview2" -MemberType NoteProperty
|
||||
}
|
||||
if ($GlobalJson.tools."xcopy-msbuild".Trim() -ine "none") {
|
||||
$xcopyMSBuildToolsFolder = InitializeXCopyMSBuild $GlobalJson.tools."xcopy-msbuild" -install $true
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
Param(
|
||||
[string] $GuardianCliLocation,
|
||||
[string] $WorkingDirectory,
|
||||
[string] $TargetDirectory,
|
||||
[string] $GdnFolder,
|
||||
# The list of Guardian tools to configure. For each object in the array:
|
||||
# - If the item is a [hashtable], it must contain these entries:
|
||||
# - Name = The tool name as Guardian knows it.
|
||||
# - Scenario = (Optional) Scenario-specific name for this configuration entry. It must be unique
|
||||
# among all tool entries with the same Name.
|
||||
# - Args = (Optional) Array of Guardian tool configuration args, like '@("Target > C:\temp")'
|
||||
# - If the item is a [string] $v, it is treated as '@{ Name="$v" }'
|
||||
[object[]] $ToolsList,
|
||||
[string] $GuardianLoggerLevel='Standard',
|
||||
# Optional: Additional params to add to any tool using CredScan.
|
||||
[string[]] $CrScanAdditionalRunConfigParams,
|
||||
# Optional: Additional params to add to any tool using PoliCheck.
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$global:LASTEXITCODE = 0
|
||||
|
||||
try {
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the SDL
|
||||
# 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
|
||||
|
||||
# Normalize tools list: all in [hashtable] form with defined values for each key.
|
||||
$ToolsList = $ToolsList |
|
||||
ForEach-Object {
|
||||
if ($_ -is [string]) {
|
||||
$_ = @{ Name = $_ }
|
||||
}
|
||||
|
||||
if (-not ($_['Scenario'])) { $_.Scenario = "" }
|
||||
if (-not ($_['Args'])) { $_.Args = @() }
|
||||
$_
|
||||
}
|
||||
|
||||
Write-Host "List of tools to configure:"
|
||||
$ToolsList | ForEach-Object { $_ | Out-String | Write-Host }
|
||||
|
||||
# We store config files in the r directory of .gdn
|
||||
$gdnConfigPath = Join-Path $GdnFolder 'r'
|
||||
$ValidPath = Test-Path $GuardianCliLocation
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
foreach ($tool in $ToolsList) {
|
||||
# Put together the name and scenario to make a unique key.
|
||||
$toolConfigName = $tool.Name
|
||||
if ($tool.Scenario) {
|
||||
$toolConfigName += "_" + $tool.Scenario
|
||||
}
|
||||
|
||||
Write-Host "=== Configuring $toolConfigName..."
|
||||
|
||||
$gdnConfigFile = Join-Path $gdnConfigPath "$toolConfigName-configure.gdnconfig"
|
||||
|
||||
# For some tools, add default and automatic args.
|
||||
if ($tool.Name -eq 'credscan') {
|
||||
if ($targetDirectory) {
|
||||
$tool.Args += "`"TargetDirectory < $TargetDirectory`""
|
||||
}
|
||||
$tool.Args += "`"OutputType < pre`""
|
||||
$tool.Args += $CrScanAdditionalRunConfigParams
|
||||
} elseif ($tool.Name -eq 'policheck') {
|
||||
if ($targetDirectory) {
|
||||
$tool.Args += "`"Target < $TargetDirectory`""
|
||||
}
|
||||
$tool.Args += $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
|
||||
# Create variable pointing to the args array directly so we can use splat syntax later.
|
||||
$toolArgs = $tool.Args
|
||||
|
||||
# Configure the tool. If args array is provided or the current tool has some default arguments
|
||||
# defined, add "--args" and splat each element on the end. Arg format is "{Arg id} < {Value}",
|
||||
# one per parameter. Doc page for "guardian configure":
|
||||
# https://dev.azure.com/securitytools/SecurityIntegration/_wiki/wikis/Guardian/1395/configure
|
||||
Exec-BlockVerbosely {
|
||||
& $GuardianCliLocation configure `
|
||||
--working-directory $WorkingDirectory `
|
||||
--tool $tool.Name `
|
||||
--output-path $gdnConfigFile `
|
||||
--logger-level $GuardianLoggerLevel `
|
||||
--noninteractive `
|
||||
--force `
|
||||
$(if ($toolArgs) { "--args" }) @toolArgs
|
||||
Exit-IfNZEC "Sdl"
|
||||
}
|
||||
|
||||
Write-Host "Created '$toolConfigName' configuration file: $gdnConfigFile"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
|
@ -7,8 +7,17 @@ Param(
|
|||
[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
|
||||
|
||||
# Optional: list of SDL tools to run on source code. See 'configure-sdl-tool.ps1' for tools list
|
||||
# format.
|
||||
[object[]] $SourceToolsList,
|
||||
# Optional: list of SDL tools to run on built artifacts. See 'configure-sdl-tool.ps1' for tools
|
||||
# list format.
|
||||
[object[]] $ArtifactToolsList,
|
||||
# Optional: list of SDL tools to run without automatically specifying a target directory. See
|
||||
# 'configure-sdl-tool.ps1' for tools list format.
|
||||
[object[]] $CustomToolsList,
|
||||
|
||||
[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.
|
||||
|
@ -32,7 +41,7 @@ try {
|
|||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
$global:LASTEXITCODE = 0
|
||||
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the SDL
|
||||
# scripts don't necessarily execute in the same agent that run the
|
||||
|
@ -63,13 +72,16 @@ try {
|
|||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
|
||||
Exec-BlockVerbosely {
|
||||
& $(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 $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
|
||||
Exec-BlockVerbosely {
|
||||
& $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-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
|
@ -80,11 +92,41 @@ try {
|
|||
}
|
||||
}
|
||||
|
||||
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
|
||||
& $(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
|
||||
# Configure a list of tools with a default target directory. Populates the ".gdn/r" directory.
|
||||
function Configure-ToolsList([object[]] $tools, [string] $targetDirectory) {
|
||||
if ($tools -and $tools.Count -gt 0) {
|
||||
Exec-BlockVerbosely {
|
||||
& $(Join-Path $PSScriptRoot 'configure-sdl-tool.ps1') `
|
||||
-GuardianCliLocation $guardianCliLocation `
|
||||
-WorkingDirectory $workingDirectory `
|
||||
-TargetDirectory $targetDirectory `
|
||||
-GdnFolder $gdnFolder `
|
||||
-ToolsList $tools `
|
||||
-AzureDevOpsAccessToken $AzureDevOpsAccessToken `
|
||||
-GuardianLoggerLevel $GuardianLoggerLevel `
|
||||
-CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams `
|
||||
-PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
if ($BreakOnFailure) {
|
||||
Exit-IfNZEC "Sdl"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
|
||||
& $(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
|
||||
|
||||
# Configure Artifact and Source tools with default Target directories.
|
||||
Configure-ToolsList $ArtifactToolsList $ArtifactsDirectory
|
||||
Configure-ToolsList $SourceToolsList $SourceDirectory
|
||||
# Configure custom tools with no default Target directory.
|
||||
Configure-ToolsList $CustomToolsList $null
|
||||
|
||||
# At this point, all tools are configured in the ".gdn" directory. Run them all in a single call.
|
||||
# (If we used "run" multiple times, each run would overwrite data from earlier runs.)
|
||||
Exec-BlockVerbosely {
|
||||
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') `
|
||||
-GuardianCliLocation $guardianCliLocation `
|
||||
-WorkingDirectory $SourceDirectory `
|
||||
-UpdateBaseline $UpdateBaseline `
|
||||
-GdnFolder $gdnFolder
|
||||
}
|
||||
|
||||
if ($TsaPublish) {
|
||||
|
@ -92,8 +134,9 @@ try {
|
|||
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 $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
|
||||
Exec-BlockVerbosely {
|
||||
& $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-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
|
@ -106,7 +149,11 @@ try {
|
|||
|
||||
if ($BreakOnFailure) {
|
||||
Write-Host "Failing the build in case of breaking results..."
|
||||
& $guardianCliLocation break
|
||||
Exec-BlockVerbosely {
|
||||
& $guardianCliLocation break --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
}
|
||||
} else {
|
||||
Write-Host "Letting the build pass even if there were breaking results..."
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
# This script looks for each archive file in a directory and extracts it into the target directory.
|
||||
# For example, the file "$InputPath/bin.tar.gz" extracts to "$ExtractPath/bin.tar.gz.extracted/**".
|
||||
# Uses the "tar" utility added to Windows 10 / Windows 2019 that supports tar.gz and zip.
|
||||
param(
|
||||
# Full path to directory where archives are stored.
|
||||
[Parameter(Mandatory=$true)][string] $InputPath,
|
||||
# Full path to directory to extract archives into. May be the same as $InputPath.
|
||||
[Parameter(Mandatory=$true)][string] $ExtractPath
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
$disableConfigureToolsetImport = $true
|
||||
|
||||
try {
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the SDL
|
||||
# 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
|
||||
|
||||
Measure-Command {
|
||||
$jobs = @()
|
||||
|
||||
# Find archive files for non-Windows and Windows builds.
|
||||
$archiveFiles = @(
|
||||
Get-ChildItem (Join-Path $InputPath "*.tar.gz")
|
||||
Get-ChildItem (Join-Path $InputPath "*.zip")
|
||||
)
|
||||
|
||||
foreach ($targzFile in $archiveFiles) {
|
||||
$jobs += Start-Job -ScriptBlock {
|
||||
$file = $using:targzFile
|
||||
$fileName = [System.IO.Path]::GetFileName($file)
|
||||
$extractDir = Join-Path $using:ExtractPath "$fileName.extracted"
|
||||
|
||||
New-Item $extractDir -ItemType Directory -Force | Out-Null
|
||||
|
||||
Write-Host "Extracting '$file' to '$extractDir'..."
|
||||
|
||||
# Pipe errors to stdout to prevent PowerShell detecting them and quitting the job early.
|
||||
# This type of quit skips the catch, so we wouldn't be able to tell which file triggered the
|
||||
# error. Save output so it can be stored in the exception string along with context.
|
||||
$output = tar -xf $file -C $extractDir 2>&1
|
||||
# Handle NZEC manually rather than using Exit-IfNZEC: we are in a background job, so we
|
||||
# don't have access to the outer scope.
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Error extracting '$file': non-zero exit code ($LASTEXITCODE). Output: '$output'"
|
||||
}
|
||||
|
||||
Write-Host "Extracted to $extractDir"
|
||||
}
|
||||
}
|
||||
|
||||
Receive-Job $jobs -Wait
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
|
@ -10,7 +10,7 @@ Param(
|
|||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
$global:LASTEXITCODE = 0
|
||||
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the SDL
|
||||
# scripts don't necessarily execute in the same agent that run the
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Guardian.Cli" version="0.53.3"/>
|
||||
<package id="Microsoft.Guardian.Cli" version="0.109.0"/>
|
||||
</packages>
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
Param(
|
||||
[string] $GuardianCliLocation,
|
||||
[string] $WorkingDirectory,
|
||||
[string] $TargetDirectory,
|
||||
[string] $GdnFolder,
|
||||
[string[]] $ToolsList,
|
||||
[string] $UpdateBaseline,
|
||||
[string] $GuardianLoggerLevel='Standard',
|
||||
[string[]] $CrScanAdditionalRunConfigParams,
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams
|
||||
[string] $GuardianLoggerLevel='Standard'
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
$global:LASTEXITCODE = 0
|
||||
|
||||
try {
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the SDL
|
||||
|
@ -23,7 +19,6 @@ try {
|
|||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
# We store config files in the r directory of .gdn
|
||||
Write-Host $ToolsList
|
||||
$gdnConfigPath = Join-Path $GdnFolder 'r'
|
||||
$ValidPath = Test-Path $GuardianCliLocation
|
||||
|
||||
|
@ -33,37 +28,18 @@ try {
|
|||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$configParam = @('--config')
|
||||
$gdnConfigFiles = Get-ChildItem $gdnConfigPath -Recurse -Include '*.gdnconfig'
|
||||
Write-Host "Discovered Guardian config files:"
|
||||
$gdnConfigFiles | Out-String | Write-Host
|
||||
|
||||
foreach ($tool in $ToolsList) {
|
||||
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
|
||||
Write-Host $tool
|
||||
# We have to manually configure tools that run on source to look at the source directory only
|
||||
if ($tool -eq 'credscan') {
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
if ($tool -eq 'policheck') {
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
|
||||
$configParam+=$gdnConfigFile
|
||||
}
|
||||
|
||||
Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
|
||||
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
Exec-BlockVerbosely {
|
||||
& $GuardianCliLocation run `
|
||||
--working-directory $WorkingDirectory `
|
||||
--baseline mainbaseline `
|
||||
--update-baseline $UpdateBaseline `
|
||||
--logger-level $GuardianLoggerLevel `
|
||||
--config @gdnConfigFiles
|
||||
Exit-IfNZEC "Sdl"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
|
|
@ -2,17 +2,41 @@ parameters:
|
|||
enable: 'false' # Whether the SDL validation job should execute or not
|
||||
overrideParameters: '' # Optional: to override values for parameters.
|
||||
additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")'
|
||||
# Optional: if specified, restore and use this version of Guardian instead of the default.
|
||||
overrideGuardianVersion: ''
|
||||
# Optional: if true, publish the '.gdn' folder as a pipeline artifact. This can help with in-depth
|
||||
# diagnosis of problems with specific tool configurations.
|
||||
publishGuardianDirectoryToPipeline: false
|
||||
# The script to run to execute all SDL tools. Use this if you want to use a script to define SDL
|
||||
# parameters rather than relying on YAML. It may be better to use a local script, because you can
|
||||
# reproduce results locally without piecing together a command based on the YAML.
|
||||
executeAllSdlToolsScript: 'eng/common/sdl/execute-all-sdl-tools.ps1'
|
||||
# There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named
|
||||
# 'continueOnError', the parameter value is not correctly picked up.
|
||||
# This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter
|
||||
sdlContinueOnError: false # optional: determines whether to continue the build if the step errors;
|
||||
downloadArtifacts: true # optional: determines if the artifacts should be dowloaded
|
||||
# optional: determines if build artifacts should be downloaded.
|
||||
downloadArtifacts: true
|
||||
# optional: determines if this job should search the directory of downloaded artifacts for
|
||||
# 'tar.gz' and 'zip' archive files and extract them before running SDL validation tasks.
|
||||
extractArchiveArtifacts: false
|
||||
dependsOn: '' # Optional: dependencies of the job
|
||||
artifactNames: '' # Optional: patterns supplied to DownloadBuildArtifacts
|
||||
# Usage:
|
||||
# artifactNames:
|
||||
# - 'BlobArtifacts'
|
||||
# - 'Artifacts_Windows_NT_Release'
|
||||
# Optional: download a list of pipeline artifacts. 'downloadArtifacts' controls build artifacts,
|
||||
# not pipeline artifacts, so doesn't affect the use of this parameter.
|
||||
pipelineArtifactNames: []
|
||||
# Optional: location and ID of the AzDO build that the build/pipeline artifacts should be
|
||||
# downloaded from. By default, uses runtime expressions to decide based on the variables set by
|
||||
# the 'setupMaestroVars' dependency. Overriding this parameter is necessary if SDL tasks are
|
||||
# running without Maestro++/BAR involved, or to download artifacts from a specific existing build
|
||||
# to iterate quickly on SDL changes.
|
||||
AzDOProjectName: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
AzDOPipelineId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
AzDOBuildId: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
|
||||
jobs:
|
||||
- job: Run_SDL
|
||||
|
@ -22,16 +46,20 @@ jobs:
|
|||
variables:
|
||||
- group: DotNet-VSTS-Bot
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
value: ${{ parameters.AzDOProjectName }}
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
value: ${{ parameters.AzDOPipelineId }}
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
value: ${{ parameters.AzDOBuildId }}
|
||||
- template: /eng/common/templates/variables/sdl-variables.yml
|
||||
- name: GuardianVersion
|
||||
value: ${{ coalesce(parameters.overrideGuardianVersion, '$(DefaultGuardianVersion)') }}
|
||||
pool:
|
||||
name: Hosted VS2017
|
||||
vmImage: windows-2019
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
|
||||
- ${{ if ne(parameters.downloadArtifacts, 'false')}}:
|
||||
- ${{ if ne(parameters.artifactNames, '') }}:
|
||||
- ${{ each artifactName in parameters.artifactNames }}:
|
||||
|
@ -59,35 +87,44 @@ jobs:
|
|||
itemPattern: "**"
|
||||
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||
checkDownloadedFiles: true
|
||||
|
||||
- ${{ each artifactName in parameters.pipelineArtifactNames }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Pipeline Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: ${{ artifactName }}
|
||||
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||
checkDownloadedFiles: true
|
||||
|
||||
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
||||
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
|
||||
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
|
||||
displayName: Extract Blob Artifacts
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
|
||||
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
||||
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts
|
||||
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts
|
||||
displayName: Extract Package Artifacts
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'Install Guardian'
|
||||
inputs:
|
||||
restoreSolution: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
|
||||
feedsToUse: config
|
||||
nugetConfigPath: $(Build.SourcesDirectory)\eng\common\sdl\NuGet.config
|
||||
externalFeedCredentials: GuardianConnect
|
||||
restoreDirectory: $(Build.SourcesDirectory)\.packages
|
||||
- ${{ if ne(parameters.overrideParameters, '') }}:
|
||||
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1 ${{ parameters.overrideParameters }}
|
||||
displayName: Execute SDL
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
- ${{ if eq(parameters.overrideParameters, '') }}:
|
||||
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1
|
||||
-GuardianPackageName Microsoft.Guardian.Cli.0.53.3
|
||||
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
|
||||
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
|
||||
${{ parameters.additionalParameters }}
|
||||
displayName: Execute SDL
|
||||
|
||||
- ${{ if ne(parameters.extractArchiveArtifacts, 'false') }}:
|
||||
- powershell: eng/common/sdl/extract-artifact-archives.ps1
|
||||
-InputPath $(Build.ArtifactStagingDirectory)\artifacts
|
||||
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts
|
||||
displayName: Extract Archive Artifacts
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
|
||||
- template: /eng/common/templates/steps/execute-sdl.yml
|
||||
parameters:
|
||||
overrideGuardianVersion: ${{ parameters.overrideGuardianVersion }}
|
||||
executeAllSdlToolsScript: ${{ parameters.executeAllSdlToolsScript }}
|
||||
overrideParameters: ${{ parameters.overrideParameters }}
|
||||
additionalParameters: ${{ parameters.additionalParameters }}
|
||||
publishGuardianDirectoryToPipeline: ${{ parameters.publishGuardianDirectoryToPipeline }}
|
||||
sdlContinueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
|
|
|
@ -103,7 +103,7 @@ jobs:
|
|||
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
|
||||
- task: MicroBuildSigningPlugin@2
|
||||
- task: MicroBuildSigningPlugin@3
|
||||
displayName: Install MicroBuild plugin
|
||||
inputs:
|
||||
signType: $(_SignType)
|
||||
|
@ -114,6 +114,7 @@ jobs:
|
|||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
|
||||
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), eq(variables['System.TeamProject'], 'internal')) }}:
|
||||
- task: NuGetAuthenticate@0
|
||||
|
||||
- ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}:
|
||||
|
|
|
@ -4,7 +4,7 @@ parameters:
|
|||
|
||||
# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
vmImage: 'windows-2019'
|
||||
|
||||
CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
|
||||
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)
|
||||
|
@ -12,12 +12,16 @@ parameters:
|
|||
SourcesDirectory: $(Build.SourcesDirectory)
|
||||
CreatePr: true
|
||||
AutoCompletePr: false
|
||||
ReusePr: true
|
||||
UseLfLineEndings: true
|
||||
UseCheckedInLocProjectJson: false
|
||||
LanguageSet: VS_Main_Languages
|
||||
LclSource: lclFilesInRepo
|
||||
LclPackageId: ''
|
||||
RepoType: gitHub
|
||||
GitHubOrg: dotnet
|
||||
MirrorRepo: ''
|
||||
MirrorBranch: main
|
||||
condition: ''
|
||||
|
||||
jobs:
|
||||
|
@ -61,11 +65,18 @@ jobs:
|
|||
${{ if eq(parameters.CreatePr, true) }}:
|
||||
isAutoCompletePrSelected: ${{ parameters.AutoCompletePr }}
|
||||
isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }}
|
||||
${{ if eq(parameters.RepoType, 'gitHub') }}:
|
||||
isShouldReusePrSelected: ${{ parameters.ReusePr }}
|
||||
packageSourceAuth: patAuth
|
||||
patVariable: ${{ parameters.CeapexPat }}
|
||||
${{ if eq(parameters.RepoType, 'gitHub') }}:
|
||||
repoType: ${{ parameters.RepoType }}
|
||||
gitHubPatVariable: "${{ parameters.GithubPat }}"
|
||||
${{ if ne(parameters.MirrorRepo, '') }}:
|
||||
isMirrorRepoSelected: true
|
||||
gitHubOrganization: ${{ parameters.GitHubOrg }}
|
||||
mirrorRepo: ${{ parameters.MirrorRepo }}
|
||||
mirrorBranch: ${{ parameters.MirrorBranch }}
|
||||
condition: ${{ parameters.condition }}
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
|
|
|
@ -94,7 +94,31 @@ jobs:
|
|||
PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs.txt'
|
||||
PublishLocation: Container
|
||||
ArtifactName: ReleaseConfigs
|
||||
|
||||
|
||||
- task: powershell@2
|
||||
displayName: Check if SymbolPublishingExclusionsFile.txt exists
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
$symbolExclusionfile = "$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt"
|
||||
if(Test-Path -Path $symbolExclusionfile)
|
||||
{
|
||||
Write-Host "SymbolExclusionFile exists"
|
||||
Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]true"
|
||||
}
|
||||
else{
|
||||
Write-Host "Symbols Exclusion file does not exists"
|
||||
Write-Host "##vso[task.setvariable variable=SymbolExclusionFile]false"
|
||||
}
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish SymbolPublishingExclusionsFile Artifact
|
||||
condition: eq(variables['SymbolExclusionFile'], 'true')
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
||||
PublishLocation: Container
|
||||
ArtifactName: ReleaseConfigs
|
||||
|
||||
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
|
||||
- template: /eng/common/templates/steps/publish-logs.yml
|
||||
parameters:
|
||||
|
|
|
@ -31,11 +31,6 @@ parameters:
|
|||
# container and pool.
|
||||
platform: {}
|
||||
|
||||
# The default VM host AzDO pool. This should be capable of running Docker containers: almost all
|
||||
# source-build builds run in Docker, including the default managed platform.
|
||||
defaultContainerHostPool:
|
||||
vmImage: ubuntu-20.04
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.jobNamePrefix }}_${{ parameters.platform.name }}
|
||||
displayName: Source-Build (${{ parameters.platform.name }})
|
||||
|
@ -47,7 +42,15 @@ jobs:
|
|||
container: ${{ parameters.platform.container }}
|
||||
|
||||
${{ if eq(parameters.platform.pool, '') }}:
|
||||
pool: ${{ parameters.defaultContainerHostPool }}
|
||||
# The default VM host AzDO pool. This should be capable of running Docker containers: almost all
|
||||
# source-build builds run in Docker, including the default managed platform.
|
||||
pool:
|
||||
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
||||
name: NetCore1ESPool-Public
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open
|
||||
${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
name: NetCore1ESPool-Internal
|
||||
demands: ImageOverride -equals Build.Ubuntu.1804.Amd64
|
||||
${{ if ne(parameters.platform.pool, '') }}:
|
||||
pool: ${{ parameters.platform.pool }}
|
||||
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
parameters:
|
||||
runAsPublic: false
|
||||
sourceIndexPackageVersion: 1.0.1-20210421.1
|
||||
sourceIndexPackageVersion: 1.0.1-20210614.1
|
||||
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
|
||||
sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci"
|
||||
preSteps: []
|
||||
binlogPath: artifacts/log/Debug/Build.binlog
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
condition: ''
|
||||
dependsOn: ''
|
||||
|
||||
jobs:
|
||||
- job: SourceIndexStage1
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
condition: ${{ parameters.condition }}
|
||||
variables:
|
||||
- name: SourceIndexPackageVersion
|
||||
value: ${{ parameters.sourceIndexPackageVersion }}
|
||||
|
@ -20,7 +22,13 @@ jobs:
|
|||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- group: source-dot-net stage1 variables
|
||||
|
||||
pool: ${{ parameters.pool }}
|
||||
pool:
|
||||
${{ if eq(variables['System.TeamProject'], 'public') }}:
|
||||
name: NetCore1ESPool-Public
|
||||
demands: ImageOverride -equals Build.Server.Amd64.VS2019.Open
|
||||
${{ if eq(variables['System.TeamProject'], 'internal') }}:
|
||||
name: NetCore1ESPool-Internal
|
||||
demands: ImageOverride -equals Build.Server.Amd64.VS2019
|
||||
steps:
|
||||
- ${{ each preStep in parameters.preSteps }}:
|
||||
- ${{ preStep }}
|
||||
|
@ -30,29 +38,24 @@ jobs:
|
|||
inputs:
|
||||
packageType: sdk
|
||||
version: 3.1.x
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: Use .NET Core sdk
|
||||
inputs:
|
||||
useGlobalJson: true
|
||||
installationPath: $(Agent.TempDirectory)/dotnet
|
||||
workingDirectory: $(Agent.TempDirectory)
|
||||
|
||||
- script: |
|
||||
dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
|
||||
dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path .source-index/tools
|
||||
echo ##vso[task.prependpath]$(Build.SourcesDirectory)/.source-index/tools
|
||||
$(Agent.TempDirectory)/dotnet/dotnet tool install BinLogToSln --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
|
||||
$(Agent.TempDirectory)/dotnet/dotnet tool install UploadIndexStage1 --version $(SourceIndexPackageVersion) --add-source $(SourceIndexPackageSource) --tool-path $(Agent.TempDirectory)/.source-index/tools
|
||||
displayName: Download Tools
|
||||
# Set working directory to temp directory so 'dotnet' doesn't try to use global.json and use the repo's sdk.
|
||||
workingDirectory: $(Agent.TempDirectory)
|
||||
|
||||
- script: ${{ parameters.sourceIndexBuildCommand }}
|
||||
displayName: Build Repository
|
||||
|
||||
- script: BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
|
||||
- script: $(Agent.TempDirectory)/.source-index/tools/BinLogToSln -i $(BinlogPath) -r $(Build.SourcesDirectory) -n $(Build.Repository.Name) -o .source-index/stage1output
|
||||
displayName: Process Binlog into indexable sln
|
||||
env:
|
||||
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
|
||||
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- script: UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
|
||||
- script: $(Agent.TempDirectory)/.source-index/tools/UploadIndexStage1 -i .source-index/stage1output -n $(Build.Repository.Name)
|
||||
displayName: Upload stage1 artifacts to source index
|
||||
env:
|
||||
BLOB_CONTAINER_URL: $(source-dot-net-stage1-blob-container-url)
|
||||
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: 2
|
||||
|
|
|
@ -83,7 +83,7 @@ jobs:
|
|||
- ${{ if eq(parameters.enableSourceBuild, true) }}:
|
||||
- Source_Build_Complete
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
vmImage: 'windows-2019'
|
||||
runAsPublic: ${{ parameters.runAsPublic }}
|
||||
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
|
||||
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
|
||||
|
@ -96,4 +96,4 @@ jobs:
|
|||
dependsOn:
|
||||
- Asset_Registry_Publish
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
vmImage: 'windows-2019'
|
||||
|
|
|
@ -1,130 +0,0 @@
|
|||
parameters:
|
||||
# Optional: Clean sources before building
|
||||
clean: true
|
||||
|
||||
# Optional: Git fetch depth
|
||||
fetchDepth: ''
|
||||
|
||||
# Optional: name of the phase (not specifying phase name may cause name collisions)
|
||||
name: ''
|
||||
# Optional: display name of the phase
|
||||
displayName: ''
|
||||
|
||||
# Optional: condition for the job to run
|
||||
condition: ''
|
||||
|
||||
# Optional: dependencies of the phase
|
||||
dependsOn: ''
|
||||
|
||||
# Required: A defined YAML queue
|
||||
queue: {}
|
||||
|
||||
# Required: build steps
|
||||
steps: []
|
||||
|
||||
# Optional: variables
|
||||
variables: {}
|
||||
|
||||
# Optional: should run as a public build even in the internal project
|
||||
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
|
||||
runAsPublic: false
|
||||
|
||||
## Telemetry variables
|
||||
|
||||
# Optional: enable sending telemetry
|
||||
# if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
|
||||
# _HelixBuildConfig - differentiate between Debug, Release, other
|
||||
# _HelixSource - Example: build/product
|
||||
# _HelixType - Example: official/dotnet/arcade/$(Build.SourceBranch)
|
||||
enableTelemetry: false
|
||||
|
||||
# Optional: Enable installing Microbuild plugin
|
||||
# if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
|
||||
# _TeamName - the name of your team
|
||||
# _SignType - 'test' or 'real'
|
||||
enableMicrobuild: false
|
||||
|
||||
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
|
||||
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
|
||||
|
||||
phases:
|
||||
- phase: ${{ parameters.name }}
|
||||
|
||||
${{ if ne(parameters.displayName, '') }}:
|
||||
displayName: ${{ parameters.displayName }}
|
||||
|
||||
${{ if ne(parameters.condition, '') }}:
|
||||
condition: ${{ parameters.condition }}
|
||||
|
||||
${{ if ne(parameters.dependsOn, '') }}:
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
|
||||
queue: ${{ parameters.queue }}
|
||||
|
||||
${{ if ne(parameters.variables, '') }}:
|
||||
variables:
|
||||
${{ insert }}: ${{ parameters.variables }}
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: ${{ parameters.clean }}
|
||||
${{ if ne(parameters.fetchDepth, '') }}:
|
||||
fetchDepth: ${{ parameters.fetchDepth }}
|
||||
|
||||
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
|
||||
- template: /eng/common/templates/steps/telemetry-start.yml
|
||||
parameters:
|
||||
buildConfig: $(_HelixBuildConfig)
|
||||
helixSource: $(_HelixSource)
|
||||
helixType: $(_HelixType)
|
||||
runAsPublic: ${{ parameters.runAsPublic }}
|
||||
|
||||
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
|
||||
# Internal only resource, and Microbuild signing shouldn't be applied to PRs.
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: MicroBuildSigningPlugin@2
|
||||
displayName: Install MicroBuild plugin
|
||||
inputs:
|
||||
signType: $(_SignType)
|
||||
zipSources: false
|
||||
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
|
||||
|
||||
env:
|
||||
TeamName: $(_TeamName)
|
||||
continueOnError: false
|
||||
condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
|
||||
|
||||
# Run provided build steps
|
||||
- ${{ parameters.steps }}
|
||||
|
||||
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
|
||||
# Internal only resources
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: MicroBuildCleanup@1
|
||||
displayName: Execute Microbuild cleanup tasks
|
||||
condition: and(always(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
|
||||
env:
|
||||
TeamName: $(_TeamName)
|
||||
|
||||
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
|
||||
- template: /eng/common/templates/steps/telemetry-end.yml
|
||||
parameters:
|
||||
helixSource: $(_HelixSource)
|
||||
helixType: $(_HelixType)
|
||||
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather Asset Manifests
|
||||
inputs:
|
||||
SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
|
||||
TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
|
||||
continueOnError: false
|
||||
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Push Asset Manifests
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
|
||||
PublishLocation: Container
|
||||
ArtifactName: AssetManifests
|
||||
continueOnError: false
|
||||
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
|
|
@ -1,52 +0,0 @@
|
|||
parameters:
|
||||
dependsOn: ''
|
||||
queue: {}
|
||||
configuration: 'Debug'
|
||||
condition: succeeded()
|
||||
continueOnError: false
|
||||
runAsPublic: false
|
||||
publishUsingPipelines: false
|
||||
phases:
|
||||
- phase: Asset_Registry_Publish
|
||||
displayName: Publish to Build Asset Registry
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
queue: ${{ parameters.queue }}
|
||||
variables:
|
||||
_BuildConfig: ${{ parameters.configuration }}
|
||||
steps:
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download artifact
|
||||
inputs:
|
||||
artifactName: AssetManifests
|
||||
downloadPath: '$(Build.StagingDirectory)/Download'
|
||||
checkDownloadedFiles: true
|
||||
condition: ${{ parameters.condition }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
- task: AzureKeyVault@1
|
||||
inputs:
|
||||
azureSubscription: 'DotNet-Engineering-Services_KeyVault'
|
||||
KeyVaultName: EngKeyVault
|
||||
SecretsFilter: 'MaestroAccessToken'
|
||||
condition: ${{ parameters.condition }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Build Assets
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishBuildAssets -restore -msbuildEngine dotnet
|
||||
/p:ManifestsPath='$(Build.StagingDirectory)/Download/AssetManifests'
|
||||
/p:BuildAssetRegistryToken=$(MaestroAccessToken)
|
||||
/p:MaestroApiEndpoint=https://maestro-prod.westus2.cloudapp.azure.com
|
||||
/p:PublishUsingPipelines=${{ parameters.publishUsingPipelines }}
|
||||
/p:Configuration=$(_BuildConfig)
|
||||
condition: ${{ parameters.condition }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Logs to VSTS
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
|
||||
PublishLocation: Container
|
||||
ArtifactName: $(Agent.Os)_Asset_Registry_Publish
|
||||
continueOnError: true
|
||||
condition: always()
|
|
@ -0,0 +1,68 @@
|
|||
parameters:
|
||||
overrideGuardianVersion: ''
|
||||
executeAllSdlToolsScript: ''
|
||||
overrideParameters: ''
|
||||
additionalParameters: ''
|
||||
publishGuardianDirectoryToPipeline: false
|
||||
sdlContinueOnError: false
|
||||
condition: ''
|
||||
|
||||
steps:
|
||||
- ${{ if ne(parameters.overrideGuardianVersion, '') }}:
|
||||
- powershell: |
|
||||
$content = Get-Content $(GuardianPackagesConfigFile)
|
||||
|
||||
Write-Host "packages.config content was:`n$content"
|
||||
|
||||
$content = $content.Replace('$(DefaultGuardianVersion)', '$(GuardianVersion)')
|
||||
$content | Set-Content $(GuardianPackagesConfigFile)
|
||||
|
||||
Write-Host "packages.config content updated to:`n$content"
|
||||
displayName: Use overridden Guardian version ${{ parameters.overrideGuardianVersion }}
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'Install Guardian'
|
||||
inputs:
|
||||
restoreSolution: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
|
||||
feedsToUse: config
|
||||
nugetConfigPath: $(Build.SourcesDirectory)\eng\common\sdl\NuGet.config
|
||||
externalFeedCredentials: GuardianConnect
|
||||
restoreDirectory: $(Build.SourcesDirectory)\.packages
|
||||
|
||||
- ${{ if ne(parameters.overrideParameters, '') }}:
|
||||
- powershell: ${{ parameters.executeAllSdlToolsScript }} ${{ parameters.overrideParameters }}
|
||||
displayName: Execute SDL
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
condition: ${{ parameters.condition }}
|
||||
|
||||
- ${{ if eq(parameters.overrideParameters, '') }}:
|
||||
- powershell: ${{ parameters.executeAllSdlToolsScript }}
|
||||
-GuardianPackageName Microsoft.Guardian.Cli.$(GuardianVersion)
|
||||
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
|
||||
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
|
||||
${{ parameters.additionalParameters }}
|
||||
displayName: Execute SDL
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
condition: ${{ parameters.condition }}
|
||||
|
||||
- ${{ if ne(parameters.publishGuardianDirectoryToPipeline, 'false') }}:
|
||||
# We want to publish the Guardian results and configuration for easy diagnosis. However, the
|
||||
# '.gdn' dir is a mix of configuration, results, extracted dependencies, and Guardian default
|
||||
# tooling files. Some of these files are large and aren't useful during an investigation, so
|
||||
# exclude them by simply deleting them before publishing. (As of writing, there is no documented
|
||||
# way to selectively exclude a dir from the pipeline artifact publish task.)
|
||||
- task: DeleteFiles@1
|
||||
displayName: Delete Guardian dependencies to avoid uploading
|
||||
inputs:
|
||||
SourceFolder: $(Agent.BuildDirectory)/.gdn
|
||||
Contents: |
|
||||
c
|
||||
i
|
||||
condition: succeededOrFailed()
|
||||
- publish: $(Agent.BuildDirectory)/.gdn
|
||||
artifact: GuardianConfiguration
|
||||
displayName: Publish GuardianConfiguration
|
||||
condition: succeededOrFailed()
|
|
@ -20,7 +20,6 @@ parameters:
|
|||
IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
|
||||
DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json
|
||||
DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json
|
||||
EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control
|
||||
WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
|
||||
IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
|
||||
HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting int)
|
||||
|
@ -54,7 +53,6 @@ steps:
|
|||
IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
|
||||
DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
|
||||
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
|
||||
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
|
||||
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
|
||||
HelixBaseUri: ${{ parameters.HelixBaseUri }}
|
||||
Creator: ${{ parameters.Creator }}
|
||||
|
@ -85,7 +83,6 @@ steps:
|
|||
IncludeDotNetCli: ${{ parameters.IncludeDotNetCli }}
|
||||
DotNetCliPackageType: ${{ parameters.DotNetCliPackageType }}
|
||||
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
|
||||
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
|
||||
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
|
||||
HelixBaseUri: ${{ parameters.HelixBaseUri }}
|
||||
Creator: ${{ parameters.Creator }}
|
||||
|
|
|
@ -18,6 +18,35 @@ steps:
|
|||
set -x
|
||||
df -h
|
||||
|
||||
# If building on the internal project, the artifact feeds variable may be available (usually only if needed)
|
||||
# In that case, call the feed setup script to add internal feeds corresponding to public ones.
|
||||
# In addition, add an msbuild argument to copy the WIP from the repo to the target build location.
|
||||
# This is because SetupNuGetSources.sh will alter the current NuGet.config file, and we need to preserve those
|
||||
# changes.
|
||||
$internalRestoreArgs=
|
||||
if [ '$(dn-bot-dnceng-artifact-feeds-rw)' != '$''(dn-bot-dnceng-artifact-feeds-rw)' ]; then
|
||||
# Temporarily work around https://github.com/dotnet/arcade/issues/7709
|
||||
chmod +x $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
|
||||
$(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh $(Build.SourcesDirectory)/NuGet.config $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
internalRestoreArgs='/p:CopyWipIntoInnerSourceBuildRepo=true'
|
||||
|
||||
# The 'Copy WIP' feature of source build uses git stash to apply changes from the original repo.
|
||||
# This only works if there is a username/email configured, which won't be the case in most CI runs.
|
||||
git config --get user.email
|
||||
if [ $? -ne 0 ]; then
|
||||
git config user.email dn-bot@microsoft.com
|
||||
git config user.name dn-bot
|
||||
fi
|
||||
fi
|
||||
|
||||
# If building on the internal project, the internal storage variable may be available (usually only if needed)
|
||||
# In that case, add variables to allow the download of internal runtimes if the specified versions are not found
|
||||
# in the default public locations.
|
||||
internalRuntimeDownloadArgs=
|
||||
if [ '$(dotnetclimsrc-read-sas-token-base64)' != '$''(dotnetclimsrc-read-sas-token-base64)' ]; then
|
||||
internalRuntimeDownloadArgs='/p:DotNetRuntimeSourceFeed=https://dotnetclimsrc.blob.core.windows.net/dotnet /p:DotNetRuntimeSourceFeedKey=$(dotnetclimsrc-read-sas-token-base64) --runtimesourcefeed https://dotnetclimsrc.blob.core.windows.net/dotnet --runtimesourcefeedkey $(dotnetclimsrc-read-sas-token-base64)'
|
||||
fi
|
||||
|
||||
buildConfig=Release
|
||||
# Check if AzDO substitutes in a build config from a variable, and use it if so.
|
||||
if [ '$(_BuildConfig)' != '$''(_BuildConfig)' ]; then
|
||||
|
@ -43,6 +72,8 @@ steps:
|
|||
--configuration $buildConfig \
|
||||
--restore --build --pack $publishArgs -bl \
|
||||
$officialBuildArgs \
|
||||
$internalRuntimeDownloadArgs \
|
||||
$internalRestoreArgs \
|
||||
$targetRidArgs \
|
||||
/p:SourceBuildNonPortable=${{ parameters.platform.nonPortable }} \
|
||||
/p:ArcadeBuildFromSource=true
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
variables:
|
||||
# The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in
|
||||
# sync with the packages.config file.
|
||||
- name: DefaultGuardianVersion
|
||||
value: 0.109.0
|
||||
- name: GuardianPackagesConfigFile
|
||||
value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
|
|
@ -42,7 +42,7 @@
|
|||
[bool]$useInstalledDotNetCli = if (Test-Path variable:useInstalledDotNetCli) { $useInstalledDotNetCli } else { $true }
|
||||
|
||||
# Enable repos to use a particular version of the on-line dotnet-install scripts.
|
||||
# default URL: https://dot.net/v1/dotnet-install.ps1
|
||||
# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1
|
||||
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' }
|
||||
|
||||
# True to use global NuGet cache instead of restoring packages to repository-local directory.
|
||||
|
@ -106,6 +106,46 @@ function Exec-Process([string]$command, [string]$commandArgs) {
|
|||
}
|
||||
}
|
||||
|
||||
# Take the given block, print it, print what the block probably references from the current set of
|
||||
# variables using low-effort string matching, then run the block.
|
||||
#
|
||||
# This is intended to replace the pattern of manually copy-pasting a command, wrapping it in quotes,
|
||||
# and printing it using "Write-Host". The copy-paste method is more readable in build logs, but less
|
||||
# maintainable and less reliable. It is easy to make a mistake and modify the command without
|
||||
# properly updating the "Write-Host" line, resulting in misleading build logs. The probability of
|
||||
# this mistake makes the pattern hard to trust when it shows up in build logs. Finding the bug in
|
||||
# existing source code can also be difficult, because the strings are not aligned to each other and
|
||||
# the line may be 300+ columns long.
|
||||
#
|
||||
# By removing the need to maintain two copies of the command, Exec-BlockVerbosely avoids the issues.
|
||||
#
|
||||
# In Bash (or any posix-like shell), "set -x" prints usable verbose output automatically.
|
||||
# "Set-PSDebug" appears to be similar at first glance, but unfortunately, it isn't very useful: it
|
||||
# doesn't print any info about the variables being used by the command, which is normally the
|
||||
# interesting part to diagnose.
|
||||
function Exec-BlockVerbosely([scriptblock] $block) {
|
||||
Write-Host "--- Running script block:"
|
||||
$blockString = $block.ToString().Trim()
|
||||
Write-Host $blockString
|
||||
|
||||
Write-Host "--- List of variables that might be used:"
|
||||
# For each variable x in the environment, check the block for a reference to x via simple "$x" or
|
||||
# "@x" syntax. This doesn't detect other ways to reference variables ("${x}" nor "$variable:x",
|
||||
# among others). It only catches what this function was originally written for: simple
|
||||
# command-line commands.
|
||||
$variableTable = Get-Variable |
|
||||
Where-Object {
|
||||
$blockString.Contains("`$$($_.Name)") -or $blockString.Contains("@$($_.Name)")
|
||||
} |
|
||||
Format-Table -AutoSize -HideTableHeaders -Wrap |
|
||||
Out-String
|
||||
Write-Host $variableTable.Trim()
|
||||
|
||||
Write-Host "--- Executing:"
|
||||
& $block
|
||||
Write-Host "--- Done running script block!"
|
||||
}
|
||||
|
||||
# createSdkLocationFile parameter enables a file being generated under the toolset directory
|
||||
# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations
|
||||
# as dot sourcing isn't possible.
|
||||
|
@ -193,38 +233,42 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
|
|||
return $global:_DotNetInstallDir = $dotnetRoot
|
||||
}
|
||||
|
||||
function Retry($downloadBlock, $maxRetries = 5) {
|
||||
$retries = 1
|
||||
|
||||
while($true) {
|
||||
try {
|
||||
& $downloadBlock
|
||||
break
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
}
|
||||
|
||||
if (++$retries -le $maxRetries) {
|
||||
$delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
|
||||
Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
|
||||
Start-Sleep -Seconds $delayInSeconds
|
||||
}
|
||||
else {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to download file in $maxRetries attempts."
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function GetDotNetInstallScript([string] $dotnetRoot) {
|
||||
$installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
|
||||
if (!(Test-Path $installScript)) {
|
||||
Create-Directory $dotnetRoot
|
||||
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
|
||||
$uri = "https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.ps1"
|
||||
|
||||
$maxRetries = 5
|
||||
$retries = 1
|
||||
|
||||
$uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
|
||||
|
||||
while($true) {
|
||||
try {
|
||||
Write-Host "GET $uri"
|
||||
Invoke-WebRequest $uri -OutFile $installScript
|
||||
break
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to download '$uri'"
|
||||
Write-Error $_.Exception.Message -ErrorAction Continue
|
||||
}
|
||||
|
||||
if (++$retries -le $maxRetries) {
|
||||
$delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
|
||||
Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
|
||||
Start-Sleep -Seconds $delayInSeconds
|
||||
}
|
||||
else {
|
||||
throw "Unable to download file in $maxRetries attempts."
|
||||
}
|
||||
|
||||
}
|
||||
Retry({
|
||||
Write-Host "GET $uri"
|
||||
Invoke-WebRequest $uri -OutFile $installScript
|
||||
})
|
||||
}
|
||||
|
||||
return $installScript
|
||||
|
@ -254,31 +298,44 @@ function InstallDotNet([string] $dotnetRoot,
|
|||
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
|
||||
if ($noPath) { $installParameters.NoPath = $True }
|
||||
|
||||
try {
|
||||
& $installScript @installParameters
|
||||
}
|
||||
catch {
|
||||
if ($runtimeSourceFeed -or $runtimeSourceFeedKey) {
|
||||
Write-Host "Failed to install dotnet from public location. Trying from '$runtimeSourceFeed'"
|
||||
if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed }
|
||||
$variations = @()
|
||||
$variations += @($installParameters)
|
||||
|
||||
if ($runtimeSourceFeedKey) {
|
||||
$decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
|
||||
$decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
|
||||
$installParameters.FeedCredential = $decodedString
|
||||
}
|
||||
$dotnetBuilds = $installParameters.Clone()
|
||||
$dotnetbuilds.AzureFeed = "https://dotnetbuilds.azureedge.net/public"
|
||||
$variations += @($dotnetBuilds)
|
||||
|
||||
try {
|
||||
& $installScript @installParameters
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from custom location '$runtimeSourceFeed'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from public location."
|
||||
ExitWithExitCode 1
|
||||
if ($runtimeSourceFeed) {
|
||||
$runtimeSource = $installParameters.Clone()
|
||||
$runtimeSource.AzureFeed = $runtimeSourceFeed
|
||||
if ($runtimeSourceFeedKey) {
|
||||
$decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
|
||||
$decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
|
||||
$runtimeSource.FeedCredential = $decodedString
|
||||
}
|
||||
$variations += @($runtimeSource)
|
||||
}
|
||||
|
||||
$installSuccess = $false
|
||||
foreach ($variation in $variations) {
|
||||
if ($variation | Get-Member AzureFeed) {
|
||||
$location = $variation.AzureFeed
|
||||
} else {
|
||||
$location = "public location";
|
||||
}
|
||||
Write-Host "Attempting to install dotnet from $location."
|
||||
try {
|
||||
& $installScript @variation
|
||||
$installSuccess = $true
|
||||
break
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to install dotnet from $location."
|
||||
}
|
||||
}
|
||||
if (-not $installSuccess) {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from any of the specified locations."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -308,8 +365,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
|||
|
||||
# If the version of msbuild is going to be xcopied,
|
||||
# use this version. Version matches a package here:
|
||||
# https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=16.8.0-preview3&view=overview
|
||||
$defaultXCopyMSBuildVersion = '16.8.0-preview3'
|
||||
# https://dev.azure.com/dnceng/public/_packaging?_a=package&feed=dotnet-eng&package=RoslynTools.MSBuild&protocolType=NuGet&version=16.10.0-preview2&view=overview
|
||||
$defaultXCopyMSBuildVersion = '16.10.0-preview2'
|
||||
|
||||
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
|
||||
$vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { $vsMinVersionReqdStr }
|
||||
|
@ -374,7 +431,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
|||
}
|
||||
|
||||
$msbuildVersionDir = if ([int]$vsMajorVersion -lt 16) { "$vsMajorVersion.0" } else { "Current" }
|
||||
return $global:_MSBuildExe = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin\msbuild.exe"
|
||||
|
||||
$local:BinFolder = Join-Path $vsInstallDir "MSBuild\$msbuildVersionDir\Bin"
|
||||
$local:Prefer64bit = if (Get-Member -InputObject $vsRequirements -Name 'Prefer64bit') { $vsRequirements.Prefer64bit } else { $false }
|
||||
if ($local:Prefer64bit -and (Test-Path(Join-Path $local:BinFolder "amd64"))) {
|
||||
$global:_MSBuildExe = Join-Path $local:BinFolder "amd64\msbuild.exe"
|
||||
} else {
|
||||
$global:_MSBuildExe = Join-Path $local:BinFolder "msbuild.exe"
|
||||
}
|
||||
|
||||
return $global:_MSBuildExe
|
||||
}
|
||||
|
||||
function InitializeVisualStudioEnvironmentVariables([string] $vsInstallDir, [string] $vsMajorVersion) {
|
||||
|
@ -403,9 +469,13 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
|
|||
}
|
||||
|
||||
Create-Directory $packageDir
|
||||
|
||||
Write-Host "Downloading $packageName $packageVersion"
|
||||
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
|
||||
Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -OutFile $packagePath
|
||||
Retry({
|
||||
Invoke-WebRequest "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/flat2/$packageName/$packageVersion/$packageName.$packageVersion.nupkg" -OutFile $packagePath
|
||||
})
|
||||
|
||||
Unzip $packagePath $packageDir
|
||||
}
|
||||
|
||||
|
@ -442,27 +512,9 @@ function LocateVisualStudio([object]$vsRequirements = $null){
|
|||
if (!(Test-Path $vsWhereExe)) {
|
||||
Create-Directory $vsWhereDir
|
||||
Write-Host 'Downloading vswhere'
|
||||
$maxRetries = 5
|
||||
$retries = 1
|
||||
|
||||
while($true) {
|
||||
try {
|
||||
Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
|
||||
break
|
||||
}
|
||||
catch{
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
}
|
||||
|
||||
if (++$retries -le $maxRetries) {
|
||||
$delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
|
||||
Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
|
||||
Start-Sleep -Seconds $delayInSeconds
|
||||
}
|
||||
else {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to download file in $maxRetries attempts."
|
||||
}
|
||||
}
|
||||
Retry({
|
||||
Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
|
||||
})
|
||||
}
|
||||
|
||||
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
|
||||
|
@ -498,7 +550,7 @@ function InitializeBuildTool() {
|
|||
if (Test-Path variable:global:_BuildTool) {
|
||||
# If the requested msbuild parameters do not match, clear the cached variables.
|
||||
if($global:_BuildTool.Contains('ExcludePrereleaseVS') -and $global:_BuildTool.ExcludePrereleaseVS -ne $excludePrereleaseVS) {
|
||||
Remove-Item variable:global:_BuildTool
|
||||
Remove-Item variable:global:_BuildTool
|
||||
Remove-Item variable:global:_MSBuildExe
|
||||
} else {
|
||||
return $global:_BuildTool
|
||||
|
@ -555,7 +607,7 @@ function GetDefaultMSBuildEngine() {
|
|||
|
||||
function GetNuGetPackageCachePath() {
|
||||
if ($env:NUGET_PACKAGES -eq $null) {
|
||||
# Use local cache on CI to ensure deterministic build.
|
||||
# Use local cache on CI to ensure deterministic build.
|
||||
# Avoid using the http cache as workaround for https://github.com/NuGet/Home/issues/3116
|
||||
# use global cache in dev builds to avoid cost of downloading packages.
|
||||
# For directory normalization, see also: https://github.com/NuGet/Home/issues/7968
|
||||
|
@ -633,6 +685,17 @@ function ExitWithExitCode([int] $exitCode) {
|
|||
exit $exitCode
|
||||
}
|
||||
|
||||
# Check if $LASTEXITCODE is a nonzero exit code (NZEC). If so, print a Azure Pipeline error for
|
||||
# diagnostics, then exit the script with the $LASTEXITCODE.
|
||||
function Exit-IfNZEC([string] $category = "General") {
|
||||
Write-Host "Exit code $LASTEXITCODE"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
$message = "Last command failed with exit code $LASTEXITCODE."
|
||||
Write-PipelineTelemetryError -Force -Category $category -Message $message
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
|
||||
function Stop-Processes() {
|
||||
Write-Host 'Killing running build processes...'
|
||||
foreach ($processName in $processesToStopOnExit) {
|
||||
|
@ -656,6 +719,8 @@ function MSBuild() {
|
|||
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'
|
||||
}
|
||||
|
||||
Enable-Nuget-EnhancedRetry
|
||||
|
||||
$toolsetBuildProject = InitializeToolset
|
||||
$basePath = Split-Path -parent $toolsetBuildProject
|
||||
$possiblePaths = @(
|
||||
|
@ -664,6 +729,8 @@ function MSBuild() {
|
|||
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')),
|
||||
(Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.ArcadeLogging.dll')),
|
||||
(Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
|
||||
(Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')),
|
||||
(Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
|
||||
)
|
||||
$selectedPath = $null
|
||||
foreach ($path in $possiblePaths) {
|
||||
|
@ -700,6 +767,8 @@ function MSBuild-Core() {
|
|||
}
|
||||
}
|
||||
|
||||
Enable-Nuget-EnhancedRetry
|
||||
|
||||
$buildTool = InitializeBuildTool
|
||||
|
||||
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
|
||||
|
@ -712,7 +781,10 @@ function MSBuild-Core() {
|
|||
}
|
||||
|
||||
foreach ($arg in $args) {
|
||||
if ($arg -ne $null -and $arg.Trim() -ne "") {
|
||||
if ($null -ne $arg -and $arg.Trim() -ne "") {
|
||||
if ($arg.EndsWith('\')) {
|
||||
$arg = $arg + "\"
|
||||
}
|
||||
$cmdArgs += " `"$arg`""
|
||||
}
|
||||
}
|
||||
|
@ -784,7 +856,7 @@ function Get-Darc($version) {
|
|||
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
|
||||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..\')
|
||||
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
|
||||
$ArtifactsDir = Join-Path $RepoRoot 'artifacts'
|
||||
$ToolsetDir = Join-Path $ArtifactsDir 'toolset'
|
||||
|
@ -819,3 +891,18 @@ if (!$disableConfigureToolsetImport) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# If $ci flag is set, turn on (and log that we did) special environment variables for improved Nuget client retry logic.
|
||||
#
|
||||
function Enable-Nuget-EnhancedRetry() {
|
||||
if ($ci) {
|
||||
Write-Host "Setting NUGET enhanced retry environment variables"
|
||||
$env:NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY = 'true'
|
||||
$env:NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT = 6
|
||||
$env:NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS = 1000
|
||||
Write-PipelineSetVariable -Name 'NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY' -Value 'true'
|
||||
Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT' -Value '6'
|
||||
Write-PipelineSetVariable -Name 'NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS' -Value '1000'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ warn_as_error=${warn_as_error:-true}
|
|||
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
|
||||
|
||||
# Enable repos to use a particular version of the on-line dotnet-install scripts.
|
||||
# default URL: https://dot.net/v1/dotnet-install.sh
|
||||
# default URL: https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
|
||||
dotnetInstallScriptVersion=${dotnetInstallScriptVersion:-'v1'}
|
||||
|
||||
# True to use global NuGet cache instead of restoring packages to repository-local directory.
|
||||
|
@ -178,7 +178,7 @@ function InstallDotNetSdk {
|
|||
if [[ $# -ge 3 ]]; then
|
||||
architecture=$3
|
||||
fi
|
||||
InstallDotNet "$root" "$version" $architecture 'sdk' 'false' $runtime_source_feed $runtime_source_feed_key
|
||||
InstallDotNet "$root" "$version" $architecture 'sdk' 'true' $runtime_source_feed $runtime_source_feed_key
|
||||
}
|
||||
|
||||
function InstallDotNet {
|
||||
|
@ -188,28 +188,29 @@ function InstallDotNet {
|
|||
GetDotNetInstallScript "$root"
|
||||
local install_script=$_GetDotNetInstallScript
|
||||
|
||||
local archArg=''
|
||||
local installParameters=(--version $version --install-dir "$root")
|
||||
|
||||
if [[ -n "${3:-}" ]] && [ "$3" != 'unset' ]; then
|
||||
archArg="--architecture $3"
|
||||
installParameters+=(--architecture $3)
|
||||
fi
|
||||
local runtimeArg=''
|
||||
if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then
|
||||
runtimeArg="--runtime $4"
|
||||
installParameters+=(--runtime $4)
|
||||
fi
|
||||
local skipNonVersionedFilesArg=""
|
||||
if [[ "$#" -ge "5" ]] && [[ "$5" != 'false' ]]; then
|
||||
skipNonVersionedFilesArg="--skip-non-versioned-files"
|
||||
installParameters+=(--skip-non-versioned-files)
|
||||
fi
|
||||
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
|
||||
local exit_code=$?
|
||||
echo "Failed to install dotnet SDK from public location (exit code '$exit_code')."
|
||||
|
||||
local runtimeSourceFeed=''
|
||||
if [[ -n "${6:-}" ]]; then
|
||||
runtimeSourceFeed="--azure-feed $6"
|
||||
fi
|
||||
local variations=() # list of variable names with parameter arrays in them
|
||||
|
||||
local runtimeSourceFeedKey=''
|
||||
local public_location=("${installParameters[@]}")
|
||||
variations+=(public_location)
|
||||
|
||||
local dotnetbuilds=("${installParameters[@]}" --azure-feed "https://dotnetbuilds.azureedge.net/public")
|
||||
variations+=(dotnetbuilds)
|
||||
|
||||
if [[ -n "${6:-}" ]]; then
|
||||
variations+=(private_feed)
|
||||
local private_feed=("${installParameters[@]}" --azure-feed $6)
|
||||
if [[ -n "${7:-}" ]]; then
|
||||
# The 'base64' binary on alpine uses '-d' and doesn't support '--decode'
|
||||
# '-d'. To work around this, do a simple detection and switch the parameter
|
||||
|
@ -219,22 +220,27 @@ function InstallDotNet {
|
|||
decodeArg="-d"
|
||||
fi
|
||||
decodedFeedKey=`echo $7 | base64 $decodeArg`
|
||||
runtimeSourceFeedKey="--feed-credential $decodedFeedKey"
|
||||
private_feed+=(--feed-credential $decodedFeedKey)
|
||||
fi
|
||||
fi
|
||||
|
||||
local installSuccess=0
|
||||
for variationName in "${variations[@]}"; do
|
||||
local name="$variationName[@]"
|
||||
local variation=("${!name}")
|
||||
echo "Attempting to install dotnet from $variationName."
|
||||
bash "$install_script" "${variation[@]}" && installSuccess=1
|
||||
if [[ "$installSuccess" -eq 1 ]]; then
|
||||
break
|
||||
fi
|
||||
|
||||
if [[ -n "$runtimeSourceFeed" || -n "$runtimeSourceFeedKey" ]]; then
|
||||
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg $runtimeSourceFeed $runtimeSourceFeedKey || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
else
|
||||
if [[ $exit_code != 0 ]]; then
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')."
|
||||
fi
|
||||
ExitWithExitCode $exit_code
|
||||
fi
|
||||
}
|
||||
echo "Failed to install dotnet from $variationName."
|
||||
done
|
||||
|
||||
if [[ "$installSuccess" -eq 0 ]]; then
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from any of the specified locations."
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
}
|
||||
|
||||
function with_retries {
|
||||
|
@ -262,7 +268,7 @@ function with_retries {
|
|||
function GetDotNetInstallScript {
|
||||
local root=$1
|
||||
local install_script="$root/dotnet-install.sh"
|
||||
local install_script_url="https://dot.net/$dotnetInstallScriptVersion/dotnet-install.sh"
|
||||
local install_script_url="https://dotnet.microsoft.com/download/dotnet/scripts/$dotnetInstallScriptVersion/dotnet-install.sh"
|
||||
|
||||
if [[ ! -a "$install_script" ]]; then
|
||||
mkdir -p "$root"
|
||||
|
@ -410,6 +416,13 @@ function MSBuild {
|
|||
export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
|
||||
Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20"
|
||||
Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20"
|
||||
|
||||
export NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY=true
|
||||
export NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT=6
|
||||
export NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS=1000
|
||||
Write-PipelineSetVariable -name "NUGET_ENABLE_EXPERIMENTAL_HTTP_RETRY" -value "true"
|
||||
Write-PipelineSetVariable -name "NUGET_EXPERIMENTAL_MAX_NETWORK_TRY_COUNT" -value "6"
|
||||
Write-PipelineSetVariable -name "NUGET_EXPERIMENTAL_NETWORK_RETRY_DELAY_MILLISECONDS" -value "1000"
|
||||
fi
|
||||
|
||||
local toolset_dir="${_InitializeToolset%/*}"
|
||||
|
@ -420,6 +433,8 @@ function MSBuild {
|
|||
possiblePaths+=( "$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll" )
|
||||
possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.ArcadeLogging.dll" )
|
||||
possiblePaths+=( "$toolset_dir/netcoreapp2.1/Microsoft.DotNet.Arcade.Sdk.dll" )
|
||||
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.ArcadeLogging.dll" )
|
||||
possiblePaths+=( "$toolset_dir/netcoreapp3.1/Microsoft.DotNet.Arcade.Sdk.dll" )
|
||||
for path in "${possiblePaths[@]}"; do
|
||||
if [[ -f $path ]]; then
|
||||
selectedPath=$path
|
||||
|
@ -485,13 +500,14 @@ _script_dir=`dirname "$_ResolvePath"`
|
|||
|
||||
eng_root=`cd -P "$_script_dir/.." && pwd`
|
||||
repo_root=`cd -P "$_script_dir/../.." && pwd`
|
||||
artifacts_dir="$repo_root/artifacts"
|
||||
repo_root="${repo_root}/"
|
||||
artifacts_dir="${repo_root}artifacts"
|
||||
toolset_dir="$artifacts_dir/toolset"
|
||||
tools_dir="$repo_root/.tools"
|
||||
tools_dir="${repo_root}.tools"
|
||||
log_dir="$artifacts_dir/log/$configuration"
|
||||
temp_dir="$artifacts_dir/tmp/$configuration"
|
||||
|
||||
global_json_file="$repo_root/global.json"
|
||||
global_json_file="${repo_root}global.json"
|
||||
# determine if global.json contains a "runtimes" entry
|
||||
global_json_has_runtimes=false
|
||||
if command -v jq &> /dev/null; then
|
||||
|
@ -504,7 +520,7 @@ fi
|
|||
|
||||
# HOME may not be defined in some scenarios, but it is required by NuGet
|
||||
if [[ -z $HOME ]]; then
|
||||
export HOME="$repo_root/artifacts/.home/"
|
||||
export HOME="${repo_root}artifacts/.home/"
|
||||
mkdir -p "$HOME"
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "6.0.100-preview.3.21202.5",
|
||||
"version": "6.0.100",
|
||||
"allowPrerelease": true,
|
||||
"rollForward": "major"
|
||||
},
|
||||
"tools": {
|
||||
"dotnet": "6.0.100-preview.3.21202.5",
|
||||
"dotnet": "6.0.100",
|
||||
"runtimes": {
|
||||
"dotnet": [
|
||||
"3.1.0"
|
||||
|
@ -17,6 +17,6 @@
|
|||
"xcopy-msbuild": "16.8.0-preview2.1"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21304.1"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22054.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,25 +108,11 @@ namespace Microsoft.CodeAnalysis.Testing.Verifiers
|
|||
|
||||
public virtual void SequenceEqual<T>(IEnumerable<T> expected, IEnumerable<T> actual, IEqualityComparer<T>? equalityComparer = null, string? message = null)
|
||||
{
|
||||
if (message is null && Context.IsEmpty)
|
||||
var comparer = new SequenceEqualEnumerableEqualityComparer<T>(equalityComparer);
|
||||
var areEqual = comparer.Equals(expected, actual);
|
||||
if (!areEqual)
|
||||
{
|
||||
if (equalityComparer is null)
|
||||
{
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.Equal(expected, actual, equalityComparer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var comparer = new SequenceEqualEnumerableEqualityComparer<T>(equalityComparer);
|
||||
var areEqual = comparer.Equals(expected, actual);
|
||||
if (!areEqual)
|
||||
{
|
||||
throw new EqualWithMessageException(expected, actual, CreateMessage(message));
|
||||
}
|
||||
throw new EqualWithMessageException(expected, actual, CreateMessage(message));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@ namespace Microsoft.CodeAnalysis.Testing.Verifiers
|
|||
var actual = new int[1];
|
||||
var verifier = new XUnitVerifier();
|
||||
var exception = Assert.ThrowsAny<EmptyException>(() => verifier.Empty("someCollectionName", actual));
|
||||
Assert.Same(actual, exception.Collection);
|
||||
Assert.Equal($"'someCollectionName' is not empty{Environment.NewLine}Assert.Empty() Failure{Environment.NewLine}Collection: [0]", exception.Message);
|
||||
Assert.Equal($"'someCollectionName' is not empty{Environment.NewLine}Assert.Empty() Failure{Environment.NewLine}Expected: <empty>{Environment.NewLine}Actual: [0]", exception.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -26,8 +25,7 @@ namespace Microsoft.CodeAnalysis.Testing.Verifiers
|
|||
var actual = new int[1];
|
||||
var verifier = new XUnitVerifier().PushContext("Known Context");
|
||||
var exception = Assert.ThrowsAny<EmptyException>(() => verifier.Empty("someCollectionName", actual));
|
||||
Assert.Same(actual, exception.Collection);
|
||||
Assert.Equal($"Context: Known Context{Environment.NewLine}'someCollectionName' is not empty{Environment.NewLine}Assert.Empty() Failure{Environment.NewLine}Collection: [0]", exception.Message);
|
||||
Assert.Equal($"Context: Known Context{Environment.NewLine}'someCollectionName' is not empty{Environment.NewLine}Assert.Empty() Failure{Environment.NewLine}Expected: <empty>{Environment.NewLine}Actual: [0]", exception.Message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
Загрузка…
Ссылка в новой задаче