Skip to content

Commit 40253f7

Browse files
Update dependencies from https://github.com/dotnet/arcade build 20191207.3 (#3798)
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19607.3
1 parent 2c9568d commit 40253f7

File tree

9 files changed

+94
-20
lines changed

9 files changed

+94
-20
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272
</Dependency>
7373
</ProductDependencies>
7474
<ToolsetDependencies>
75-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19603.16">
75+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19607.3">
7676
<Uri>https://github.com/dotnet/arcade</Uri>
77-
<Sha>8e47254f93b276c974968aff83222f89ec3931ed</Sha>
77+
<Sha>4d80b9cfa53e309c8f685abff3512f60c3d8a3d1</Sha>
7878
</Dependency>
7979
</ToolsetDependencies>
8080
</Dependencies>

eng/common/SetupNugetSources.ps1

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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."
@@ -123,19 +123,21 @@ if ($creds -eq $null) {
123123
$doc.DocumentElement.AppendChild($creds) | Out-Null
124124
}
125125

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

129131
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
130132
if ($dotnet3Source -ne $null) {
131-
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
132-
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
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
133135
}
134136

135137
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
136138
if ($dotnet31Source -ne $null) {
137-
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
138-
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 "dn-bot" -Password $Password
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
139141
}
140142

141143
$doc.Save($filename)

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

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
}
99
},
1010
"msbuild-sdks": {
11-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19603.16"
11+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19607.3"
1212
}
1313
}

0 commit comments

Comments
 (0)