Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit df2fa28

Browse files
[release/3.1] Update dependencies from dotnet/arcade (#28147)
* Update dependencies from https://github.com/dotnet/arcade build 20210210.10 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Helix.Sdk From Version 1.0.0-beta.21072.7 -> To Version 1.0.0-beta.21110.10 * Update dependencies from https://github.com/dotnet/arcade build 20210308.9 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Helix.Sdk From Version 1.0.0-beta.21072.7 -> To Version 1.0.0-beta.21158.9 * Update dependencies from https://github.com/dotnet/arcade build 20210311.1 Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Helix.Sdk From Version 1.0.0-beta.21072.7 -> To Version 1.0.0-beta.21161.1 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
1 parent 5ec67f2 commit df2fa28

File tree

10 files changed

+163
-105
lines changed

10 files changed

+163
-105
lines changed

eng/Version.Details.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
<ProductDependencies>
33
</ProductDependencies>
44
<ToolsetDependencies>
5-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.21072.7">
5+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.21161.1">
66
<Uri>https://github.com/dotnet/arcade</Uri>
7-
<Sha>620462dd065490620c03a80cea8e251004f6bf21</Sha>
7+
<Sha>9467b1074927ee3fe98d539d3b72f5686c861958</Sha>
88
</Dependency>
9-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.21072.7">
9+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.21161.1">
1010
<Uri>https://github.com/dotnet/arcade</Uri>
11-
<Sha>620462dd065490620c03a80cea8e251004f6bf21</Sha>
11+
<Sha>9467b1074927ee3fe98d539d3b72f5686c861958</Sha>
1212
</Dependency>
13-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.21072.7">
13+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="2.2.0-beta.21161.1">
1414
<Uri>https://github.com/dotnet/arcade</Uri>
15-
<Sha>620462dd065490620c03a80cea8e251004f6bf21</Sha>
15+
<Sha>9467b1074927ee3fe98d539d3b72f5686c861958</Sha>
1616
</Dependency>
17-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.21072.7">
17+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="1.0.0-beta.21161.1">
1818
<Uri>https://github.com/dotnet/arcade</Uri>
19-
<Sha>620462dd065490620c03a80cea8e251004f6bf21</Sha>
19+
<Sha>9467b1074927ee3fe98d539d3b72f5686c861958</Sha>
2020
</Dependency>
2121
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.7.0-servicing.20460.1">
2222
<Uri>https://github.com/dotnet/corefx</Uri>

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<UsingToolXliff>false</UsingToolXliff>
1616
<!-- Package versions -->
1717
<!-- arcade -->
18-
<MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.21072.7</MicrosoftDotNetBuildTasksFeedVersion>
19-
<MicrosoftDotNetBuildTasksPackagingVersion>1.0.0-beta.21072.7</MicrosoftDotNetBuildTasksPackagingVersion>
20-
<MicrosoftDotNetHelixSdkVersion>2.0.0-beta.21072.7</MicrosoftDotNetHelixSdkVersion>
18+
<MicrosoftDotNetBuildTasksFeedVersion>2.2.0-beta.21161.1</MicrosoftDotNetBuildTasksFeedVersion>
19+
<MicrosoftDotNetBuildTasksPackagingVersion>1.0.0-beta.21161.1</MicrosoftDotNetBuildTasksPackagingVersion>
20+
<MicrosoftDotNetHelixSdkVersion>2.0.0-beta.21161.1</MicrosoftDotNetHelixSdkVersion>
2121
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.19278.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
2222
<!-- roslyn -->
2323
<MicrosoftNetCompilersToolsetVersion>3.3.0-beta2-19367-02</MicrosoftNetCompilersToolsetVersion>

eng/common/build.ps1

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,44 @@ Param(
2222
[switch] $ci,
2323
[switch] $prepareMachine,
2424
[switch] $help,
25+
[string] $runtimeSourceFeed = "",
26+
[string] $runtimeSourceFeedKey = "",
2527
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
2628
)
2729

2830
. $PSScriptRoot\tools.ps1
2931

3032
function Print-Usage() {
3133
Write-Host "Common settings:"
32-
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
33-
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
34-
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
35-
Write-Host " -binaryLog Output binary log (short: -bl)"
36-
Write-Host " -help Print help and exit"
34+
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
35+
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
36+
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
37+
Write-Host " -binaryLog Output binary log (short: -bl)"
38+
Write-Host " -help Print help and exit"
3739
Write-Host ""
3840

3941
Write-Host "Actions:"
40-
Write-Host " -restore Restore dependencies (short: -r)"
41-
Write-Host " -build Build solution (short: -b)"
42-
Write-Host " -rebuild Rebuild solution"
43-
Write-Host " -deploy Deploy built VSIXes"
44-
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
45-
Write-Host " -test Run all unit tests in the solution (short: -t)"
46-
Write-Host " -integrationTest Run all integration tests in the solution"
47-
Write-Host " -performanceTest Run all performance tests in the solution"
48-
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
49-
Write-Host " -sign Sign build outputs"
50-
Write-Host " -publish Publish artifacts (e.g. symbols)"
42+
Write-Host " -restore Restore dependencies (short: -r)"
43+
Write-Host " -build Build solution (short: -b)"
44+
Write-Host " -rebuild Rebuild solution"
45+
Write-Host " -deploy Deploy built VSIXes"
46+
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
47+
Write-Host " -test Run all unit tests in the solution (short: -t)"
48+
Write-Host " -integrationTest Run all integration tests in the solution"
49+
Write-Host " -performanceTest Run all performance tests in the solution"
50+
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
51+
Write-Host " -sign Sign build outputs"
52+
Write-Host " -publish Publish artifacts (e.g. symbols)"
5153
Write-Host ""
5254

5355
Write-Host "Advanced settings:"
54-
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
55-
Write-Host " -ci Set when running on CI server"
56-
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
57-
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
58-
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
56+
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
57+
Write-Host " -ci Set when running on CI server"
58+
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
59+
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
60+
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
61+
Write-Host " -runtimeSourceFeed <value> Alternate feed source for restoring .NET Runtimes and SDKs"
62+
Write-Host " -runtimeSourceFeedKey <value> Key value for non-public values of runtimeSourceFeed"
5963
Write-Host ""
6064

6165
Write-Host "Command line arguments not listed above are passed thru to msbuild."
@@ -75,7 +79,7 @@ function InitializeCustomToolset {
7579
}
7680

7781
function Build {
78-
$toolsetBuildProj = InitializeToolset
82+
$toolsetBuildProj = InitializeToolset -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey
7983
InitializeCustomToolset
8084

8185
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }

eng/common/build.sh

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ usage()
2929
echo ""
3030

3131
echo "Advanced settings:"
32-
echo " --projects <value> Project or solution file(s) to build"
33-
echo " --ci Set when running on CI server"
34-
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
35-
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
36-
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
32+
echo " --projects <value> Project or solution file(s) to build"
33+
echo " --ci Set when running on CI server"
34+
echo " --prepareMachine Prepare machine for CI run, clean up processes after build"
35+
echo " --nodeReuse <value> Sets nodereuse msbuild parameter ('true' or 'false')"
36+
echo " --warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
37+
echo " --runtimeSourceFeed <value> Alternate (fallback) source for .NET Runtime and SDK installation"
38+
echo " --runtimeSourceFeedKey <value> Credentials (if needed) for authenticating to runtimeSourceFeed"
39+
3740
echo ""
3841
echo "Command line arguments not listed above are passed thru to msbuild."
3942
echo "Arguments can also be passed in with a single hyphen."
@@ -73,6 +76,9 @@ configuration='Debug'
7376
prepare_machine=false
7477
verbosity='minimal'
7578

79+
runtimeSourceFeed=''
80+
runtimeSourceFeedKey=''
81+
7682
properties=''
7783

7884
while [[ $# > 0 ]]; do
@@ -141,6 +147,14 @@ while [[ $# > 0 ]]; do
141147
node_reuse=$2
142148
shift
143149
;;
150+
-runtimesourcefeed)
151+
shift
152+
runtimeSourceFeed="$1"
153+
;;
154+
-runtimesourcefeedkey)
155+
shift
156+
runtimeSourceFeedKey="$1"
157+
;;
144158
*)
145159
properties="$properties $1"
146160
;;
@@ -166,7 +180,7 @@ function InitializeCustomToolset {
166180
}
167181

168182
function Build {
169-
InitializeToolset
183+
InitializeToolset $runtimeSourceFeed $runtimeSourceFeedKey
170184
InitializeCustomToolset
171185

172186
if [[ ! -z "$projects" ]]; then

eng/common/internal-feed-operations.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ function SetupCredProvider {
6464
}
6565

6666
if (($endpoints | Measure-Object).Count -gt 0) {
67-
# Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}'
6867
$endpointCredentials = @{endpointCredentials=$endpoints} | ConvertTo-Json -Compress
6968

7069
# Create the environment variables the AzDo way

eng/common/internal-feed-operations.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ function SetupCredProvider {
6262
endpoints+=']'
6363

6464
if [ ${#endpoints} -gt 2 ]; then
65-
# Create the JSON object. It should look like '{"endpointCredentials": [{"endpoint":"http://example.index.json", "username":"optional", "password":"accesstoken"}]}'
6665
local endpointCredentials="{\"endpointCredentials\": "$endpoints"}"
6766

6867
echo "##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS]$endpointCredentials"

eng/common/sdl/init-sdl.ps1

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ $ErrorActionPreference = "Stop"
1111
Set-StrictMode -Version 2.0
1212
$LASTEXITCODE = 0
1313

14+
# `tools.ps1` checks $ci to perform some actions. Since the SDL
15+
# scripts don't necessarily execute in the same agent that run the
16+
# build.ps1/sh script this variable isn't automatically set.
17+
$ci = $true
18+
. $PSScriptRoot\..\tools.ps1
19+
1420
# Don't display the console progress UI - it's a huge perf hit
1521
$ProgressPreference = 'SilentlyContinue'
1622

@@ -21,19 +27,9 @@ $uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cf
2127
$zipFile = "$WorkingDirectory/gdn.zip"
2228

2329
Add-Type -AssemblyName System.IO.Compression.FileSystem
24-
$gdnFolder = (Join-Path $WorkingDirectory ".gdn")
25-
Try
26-
{
27-
# We try to download the zip; if the request fails (e.g. the file doesn't exist), we catch it and init guardian instead
28-
Write-Host "Downloading gdn folder from internal config repostiory..."
29-
Invoke-WebRequest -Headers @{ "Accept"="application/zip"; "Authorization"="Basic $encodedPat" } -Uri $uri -OutFile $zipFile
30-
if (Test-Path $gdnFolder) {
31-
# Remove the gdn folder if it exists (it shouldn't unless there's too much caching; this is just in case)
32-
Remove-Item -Force -Recurse $gdnFolder
33-
}
34-
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory)
35-
Write-Host $gdnFolder
36-
} Catch [System.Net.WebException] {
30+
$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
31+
32+
try {
3733
# if the folder does not exist, we'll do a guardian init and push it to the remote repository
3834
Write-Host "Initializing Guardian..."
3935
Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel"
@@ -48,4 +44,10 @@ Try
4844
Write-Error "Guardian baseline failed with exit code $LASTEXITCODE."
4945
}
5046
& $(Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Initialize gdn folder"
47+
ExitWithExitCode 0
48+
}
49+
catch {
50+
Write-Host $_.ScriptStackTrace
51+
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
52+
ExitWithExitCode 1
5153
}

eng/common/tools.ps1

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function Exec-Process([string]$command, [string]$commandArgs) {
9696
}
9797
}
9898

99-
function InitializeDotNetCli([bool]$install) {
99+
function InitializeDotNetCli([bool]$install, [string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey) {
100100
if (Test-Path variable:global:_DotNetInstallDir) {
101101
return $global:_DotNetInstallDir
102102
}
@@ -138,7 +138,7 @@ function InitializeDotNetCli([bool]$install) {
138138

139139
if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) {
140140
if ($install) {
141-
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
141+
InstallDotNetSdk -dotnetRoot $dotnetRoot -version $dotnetSdkVersion -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey
142142
} else {
143143
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
144144
ExitWithExitCode 1
@@ -207,8 +207,8 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
207207
return $installScript
208208
}
209209

210-
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
211-
InstallDotNet $dotnetRoot $version $architecture
210+
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey ) {
211+
InstallDotNet -dotnetRoot $dotnetRoot -version $version -architecture $architecture -skipNonVersionedFiles $false -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey
212212
}
213213

214214
function InstallDotNet([string] $dotnetRoot,
@@ -233,10 +233,9 @@ function InstallDotNet([string] $dotnetRoot,
233233
& $installScript @installParameters
234234
}
235235
catch {
236-
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
237-
238-
# Only the runtime can be installed from a custom [private] location.
239-
if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
236+
# If we fail, retry from a custom (possibly private) location.
237+
if ($runtimeSourceFeed -or $runtimeSourceFeedKey) {
238+
Write-Host "Failed to install dotnet runtime '$runtime' version '$version' from public location; trying specified alternate feed credentials"
240239
if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed }
241240

242241
if ($runtimeSourceFeedKey) {
@@ -253,6 +252,7 @@ function InstallDotNet([string] $dotnetRoot,
253252
ExitWithExitCode 1
254253
}
255254
} else {
255+
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' version '$version' from public location."
256256
ExitWithExitCode 1
257257
}
258258
}
@@ -439,7 +439,7 @@ function LocateVisualStudio([object]$vsRequirements = $null){
439439
return $vsInfo[0]
440440
}
441441

442-
function InitializeBuildTool() {
442+
function InitializeBuildTool([string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey) {
443443
if (Test-Path variable:global:_BuildTool) {
444444
return $global:_BuildTool
445445
}
@@ -451,7 +451,7 @@ function InitializeBuildTool() {
451451
# Initialize dotnet cli if listed in 'tools'
452452
$dotnetRoot = $null
453453
if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
454-
$dotnetRoot = InitializeDotNetCli -install:$restore
454+
$dotnetRoot = InitializeDotNetCli -install:$restore -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey
455455
}
456456

457457
if ($msbuildEngine -eq "dotnet") {
@@ -523,7 +523,8 @@ function InitializeNativeTools() {
523523
}
524524
}
525525

526-
function InitializeToolset() {
526+
function InitializeToolset([string] $runtimeSourceFeed, [string] $runtimeSourceFeedKey)
527+
{
527528
if (Test-Path variable:global:_ToolsetBuildProj) {
528529
return $global:_ToolsetBuildProj
529530
}
@@ -545,7 +546,7 @@ function InitializeToolset() {
545546
ExitWithExitCode 1
546547
}
547548

548-
$buildTool = InitializeBuildTool
549+
$buildTool = InitializeBuildTool -runtimeSourceFeed $runtimeSourceFeed -runtimeSourceFeedKey $runtimeSourceFeedKey
549550

550551
$proj = Join-Path $ToolsetDir "restore.proj"
551552
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }

0 commit comments

Comments
 (0)