Skip to content

Commit 4b235df

Browse files
dotnet-maestro[bot]mmitche
authored andcommitted
[release/3.0] Update dependencies from dotnet/arcade (#17775)
* Update dependencies from https://github.com/dotnet/arcade build 20191207.3 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19607.3 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19607.3 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19607.3 Dependency coherency updates - System.Drawing.Common - 4.6.0 (parent: Microsoft.NETCore.App.Runtime.win-x64) - Microsoft.NETCore.Platforms - 3.0.0 (parent: Microsoft.NETCore.App.Runtime.win-x64) * Revert some non-arcade
1 parent 4cfaec0 commit 4b235df

11 files changed

+171
-51
lines changed

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,17 @@
417417
<Uri>https://github.com/aspnet/Extensions</Uri>
418418
<Sha>6a3428047e05c1db442a0320b788dd8415144393</Sha>
419419
</Dependency>
420-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19577.5">
420+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19607.3">
421421
<Uri>https://github.com/dotnet/arcade</Uri>
422-
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha>
422+
<Sha>4d80b9cfa53e309c8f685abff3512f60c3d8a3d1</Sha>
423423
</Dependency>
424-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19577.5">
424+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19607.3">
425425
<Uri>https://github.com/dotnet/arcade</Uri>
426-
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha>
426+
<Sha>4d80b9cfa53e309c8f685abff3512f60c3d8a3d1</Sha>
427427
</Dependency>
428-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19577.5">
428+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19607.3">
429429
<Uri>https://github.com/dotnet/arcade</Uri>
430-
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha>
430+
<Sha>4d80b9cfa53e309c8f685abff3512f60c3d8a3d1</Sha>
431431
</Dependency>
432432
<Dependency Name="Microsoft.AspNetCore.Testing" Version="3.0.2-servicing.19604.3" CoherentParentDependency="Microsoft.EntityFrameworkCore">
433433
<Uri>https://github.com/aspnet/Extensions</Uri>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
-->
6262
<PropertyGroup Label="Automated">
6363
<!-- Packages from dotnet/arcade -->
64-
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19577.5</MicrosoftDotNetGenAPIPackageVersion>
64+
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19607.3</MicrosoftDotNetGenAPIPackageVersion>
6565
<!-- Packages from dotnet/roslyn -->
6666
<MicrosoftNetCompilersToolsetPackageVersion>3.3.1-beta4-19462-11</MicrosoftNetCompilersToolsetPackageVersion>
6767
<!-- Packages from dotnet/core-setup -->

eng/common/SetupNugetSources.ps1

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# condition: eq(variables['Agent.OS'], 'Windows_NT')
1717
# inputs:
1818
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
19-
# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
19+
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
2020
# env:
2121
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
2222

@@ -83,7 +83,7 @@ function AddCredential($creds, $source, $username, $password) {
8383
$passwordElement.SetAttribute("value", $Password)
8484
}
8585

86-
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
86+
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
8787
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
8888

8989
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
@@ -95,10 +95,15 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
9595
}
9696

9797
if (!(Test-Path $ConfigFile -PathType Leaf)) {
98-
Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
98+
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
9999
ExitWithExitCode 1
100100
}
101101

102+
if (!$Password) {
103+
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
104+
ExitWithExitCode 1
105+
}
106+
102107
# Load NuGet.config
103108
$doc = New-Object System.Xml.XmlDocument
104109
$filename = (Get-Item $ConfigFile).FullName
@@ -118,10 +123,21 @@ if ($creds -eq $null) {
118123
$doc.DocumentElement.AppendChild($creds) | Out-Null
119124
}
120125

126+
$userName = "dn-bot"
127+
121128
# Insert credential nodes for Maestro's private feeds
122-
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
129+
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
123130

124-
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
125-
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
131+
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
132+
if ($dotnet3Source -ne $null) {
133+
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
134+
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
135+
}
136+
137+
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
138+
if ($dotnet31Source -ne $null) {
139+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
140+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
141+
}
126142

127-
$doc.Save($filename)
143+
$doc.Save($filename)

eng/common/SetupNugetSources.sh

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# displayName: Setup Private Feeds Credentials
1818
# inputs:
1919
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
20-
# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
20+
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
2121
# condition: ne(variables['Agent.OS'], 'Windows_NT')
2222
# env:
2323
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
@@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
4242
. "$scriptroot/tools.sh"
4343

4444
if [ ! -f "$ConfigFile" ]; then
45-
echo "Couldn't find the file NuGet config file: $ConfigFile"
45+
Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
46+
ExitWithExitCode 1
47+
fi
48+
49+
if [ -z "$CredToken" ]; then
50+
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
4651
ExitWithExitCode 1
4752
fi
4853

@@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then
5257
fi
5358

5459
# Ensure there is a <packageSources>...</packageSources> section.
55-
grep -i "<packageSources>" $ConfigFile
60+
grep -i "<packageSources>" $ConfigFile
5661
if [ "$?" != "0" ]; then
5762
echo "Adding <packageSources>...</packageSources> section."
5863
ConfigNodeHeader="<configuration>"
@@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then
6267
fi
6368

6469
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
65-
grep -i "<packageSourceCredentials>" $ConfigFile
70+
grep -i "<packageSourceCredentials>" $ConfigFile
6671
if [ "$?" != "0" ]; then
6772
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
6873

@@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then
7277
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
7378
fi
7479

75-
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
76-
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
77-
if [ "$?" != "0" ]; then
78-
echo "Adding dotnet3-internal to the packageSources."
80+
PackageSources=()
7981

80-
PackageSourcesNodeFooter="</packageSources>"
81-
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
82+
# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
83+
grep -i "<add key=\"dotnet3\"" $ConfigFile
84+
85+
if [ "$?" == "0" ]; then
86+
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
87+
if [ "$?" != "0" ]; then
88+
echo "Adding dotnet3-internal to the packageSources."
89+
PackageSourcesNodeFooter="</packageSources>"
90+
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
91+
92+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
93+
fi
94+
PackageSources+=('dotnet3-internal')
95+
96+
grep -i "<add key=\"dotnet3-internal-transport\"" $ConfigFile
97+
if [ "$?" != "0" ]; then
98+
echo "Adding dotnet3-internal-transport to the packageSources."
99+
PackageSourcesNodeFooter="</packageSources>"
100+
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
82101

83-
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
102+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
103+
fi
104+
PackageSources+=('dotnet3-internal-transport')
84105
fi
85106

86-
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
87-
grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile
88-
if [ "$?" != "0" ]; then
89-
echo "Adding dotnet3-internal-transport to the packageSources."
107+
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
108+
grep -i "<add key=\"dotnet3.1\"" $ConfigFile
109+
if [ "$?" == "0" ]; then
110+
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
111+
if [ "$?" != "0" ]; then
112+
echo "Adding dotnet3.1-internal to the packageSources."
113+
PackageSourcesNodeFooter="</packageSources>"
114+
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
90115

91-
PackageSourcesNodeFooter="</packageSources>"
92-
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
116+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
117+
fi
118+
PackageSources+=('dotnet3.1-internal')
93119

94-
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
120+
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
121+
if [ "$?" != "0" ]; then
122+
echo "Adding dotnet3.1-internal-transport to the packageSources."
123+
PackageSourcesNodeFooter="</packageSources>"
124+
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
125+
126+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
127+
fi
128+
PackageSources+=('dotnet3.1-internal-transport')
95129
fi
96130

97131
# I want things split line by line
98132
PrevIFS=$IFS
99133
IFS=$'\n'
100-
PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
134+
PackageSources+="$IFS"
135+
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
101136
IFS=$PrevIFS
102137

103-
PackageSources+=('dotnet3-internal')
104-
PackageSources+=('dotnet3-internal-transport')
105-
106138
for FeedName in ${PackageSources[@]} ; do
107139
# Check if there is no existing credential for this FeedName
108140
grep -i "<$FeedName>" $ConfigFile
@@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do
112144
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
113145
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
114146

115-
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
147+
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
116148
fi
117-
done
149+
done

eng/common/dotnet-install.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ Param(
33
[string] $verbosity = "minimal",
44
[string] $architecture = "",
55
[string] $version = "Latest",
6-
[string] $runtime = "dotnet"
6+
[string] $runtime = "dotnet",
7+
[string] $RuntimeSourceFeed = "",
8+
[string] $RuntimeSourceFeedKey = ""
79
)
810

911
. $PSScriptRoot\tools.ps1
@@ -15,7 +17,7 @@ try {
1517
if ($architecture -and $architecture.Trim() -eq "x86") {
1618
$installdir = Join-Path $installdir "x86"
1719
}
18-
InstallDotNet $installdir $version $architecture $runtime $true
20+
InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
1921
}
2022
catch {
2123
Write-Host $_

eng/common/dotnet-install.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
1414
version='Latest'
1515
architecture=''
1616
runtime='dotnet'
17+
runtimeSourceFeed=''
18+
runtimeSourceFeedKey=''
1719
while [[ $# > 0 ]]; do
1820
opt="$(echo "$1" | awk '{print tolower($0)}')"
1921
case "$opt" in
@@ -29,9 +31,16 @@ while [[ $# > 0 ]]; do
2931
shift
3032
runtime="$1"
3133
;;
34+
-runtimesourcefeed)
35+
shift
36+
runtimeSourceFeed="$1"
37+
;;
38+
-runtimesourcefeedkey)
39+
shift
40+
runtimeSourceFeedKey="$1"
41+
;;
3242
*)
3343
echo "Invalid argument: $1"
34-
usage
3544
exit 1
3645
;;
3746
esac
@@ -40,7 +49,7 @@ done
4049

4150
. "$scriptroot/tools.sh"
4251
dotnetRoot="$repo_root/.dotnet"
43-
InstallDotNet $dotnetRoot $version "$architecture" $runtime true || {
52+
InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
4453
local exit_code=$?
4554
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
4655
ExitWithExitCode $exit_code

eng/common/templates/post-build/channels/generic-internal-channel.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ stages:
2626
pool:
2727
vmImage: 'windows-2019'
2828
steps:
29+
# This is necessary whenever we want to publish/restore to an AzDO private feed
30+
- task: NuGetAuthenticate@0
31+
displayName: 'Authenticate to AzDO Feeds'
32+
2933
- task: DownloadBuildArtifacts@0
3034
displayName: Download Blob Artifacts
3135
inputs:

eng/common/templates/post-build/post-build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ stages:
4949
pool:
5050
vmImage: 'windows-2019'
5151
steps:
52+
# This is necessary whenever we want to publish/restore to an AzDO private feed
53+
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
54+
# otherwise it'll complain about accessing a private feed.
55+
- task: NuGetAuthenticate@0
56+
displayName: 'Authenticate to AzDO Feeds'
57+
5258
- task: DownloadBuildArtifacts@0
5359
displayName: Download Package Artifacts
5460
inputs:

eng/common/tools.ps1

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,14 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
184184
InstallDotNet $dotnetRoot $version $architecture
185185
}
186186

187-
function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $architecture = "", [string] $runtime = "", [bool] $skipNonVersionedFiles = $false) {
187+
function InstallDotNet([string] $dotnetRoot,
188+
[string] $version,
189+
[string] $architecture = "",
190+
[string] $runtime = "",
191+
[bool] $skipNonVersionedFiles = $false,
192+
[string] $runtimeSourceFeed = "",
193+
[string] $runtimeSourceFeedKey = "") {
194+
188195
$installScript = GetDotNetInstallScript $dotnetRoot
189196
$installParameters = @{
190197
Version = $version
@@ -195,10 +202,32 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
195202
if ($runtime) { $installParameters.Runtime = $runtime }
196203
if ($skipNonVersionedFiles) { $installParameters.SkipNonVersionedFiles = $skipNonVersionedFiles }
197204

198-
& $installScript @installParameters
199-
if ($lastExitCode -ne 0) {
200-
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet cli (exit code '$lastExitCode')."
201-
ExitWithExitCode $lastExitCode
205+
try {
206+
& $installScript @installParameters
207+
}
208+
catch {
209+
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
210+
211+
# Only the runtime can be installed from a custom [private] location.
212+
if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
213+
if ($runtimeSourceFeed) { $installParameters.AzureFeed = $runtimeSourceFeed }
214+
215+
if ($runtimeSourceFeedKey) {
216+
$decodedBytes = [System.Convert]::FromBase64String($runtimeSourceFeedKey)
217+
$decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes)
218+
$installParameters.FeedCredential = $decodedString
219+
}
220+
221+
try {
222+
& $installScript @installParameters
223+
}
224+
catch {
225+
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
226+
ExitWithExitCode 1
227+
}
228+
} else {
229+
ExitWithExitCode 1
230+
}
202231
}
203232
}
204233

eng/common/tools.sh

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,30 @@ function InstallDotNet {
200200
fi
201201
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg || {
202202
local exit_code=$?
203-
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK (exit code '$exit_code')."
204-
ExitWithExitCode $exit_code
203+
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from public location (exit code '$exit_code')."
204+
205+
if [[ -n "$runtimeArg" ]]; then
206+
local runtimeSourceFeed=''
207+
if [[ -n "${6:-}" ]]; then
208+
runtimeSourceFeed="--azure-feed $6"
209+
fi
210+
211+
local runtimeSourceFeedKey=''
212+
if [[ -n "${7:-}" ]]; then
213+
decodedFeedKey=`echo $7 | base64 --decode`
214+
runtimeSourceFeedKey="--feed-credential $decodedFeedKey"
215+
fi
216+
217+
if [[ -n "$runtimeSourceFeed" || -n "$runtimeSourceFeedKey" ]]; then
218+
bash "$install_script" --version $version --install-dir "$root" $archArg $runtimeArg $skipNonVersionedFilesArg $runtimeSourceFeed $runtimeSourceFeedKey || {
219+
local exit_code=$?
220+
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')."
221+
ExitWithExitCode $exit_code
222+
}
223+
else
224+
ExitWithExitCode $exit_code
225+
fi
226+
fi
205227
}
206228
}
207229

0 commit comments

Comments
 (0)