Skip to content

Commit f7578df

Browse files
authored
Merge pull request #8082 from dotnet/merges/master-to-release/dev16.5
Merge master to release/dev16.5
2 parents 6822bcb + faaedc4 commit f7578df

File tree

11 files changed

+42
-48
lines changed

11 files changed

+42
-48
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19630.1">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19616.5">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>01d0b636bfb96edf62a77912de25aa5cef143946</Sha>
8+
<Sha>d4a1ce6278134f5dc25843e228d0498203031e61</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

eng/common/SetupNugetSources.ps1

Lines changed: 9 additions & 7 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

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

eng/common/build.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ function Print-Usage() {
6262
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
6363
}
6464

65-
. $PSScriptRoot\tools.ps1
66-
6765
function InitializeCustomToolset {
6866
if (-not $restore) {
6967
return

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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ while [[ $# > 0 ]]; do
3131
;;
3232
*)
3333
echo "Invalid argument: $1"
34-
usage
3534
exit 1
3635
;;
3736
esac
@@ -40,7 +39,7 @@ done
4039

4140
. "$scriptroot/tools.sh"
4241
dotnetRoot="$repo_root/.dotnet"
43-
InstallDotNet $dotnetRoot $version "$architecture" $runtime true || {
42+
InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
4443
local exit_code=$?
4544
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
4645
ExitWithExitCode $exit_code

eng/common/native/install-tool.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ try {
103103
Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
104104
exit 1
105105
} elseif (@($ToolFilePath).Length -Lt 1) {
106-
Write-Host "$ToolName was not found in $ToolFilePath."
106+
Write-Error "$ToolName was not found in $ToolFilePath."
107107
exit 1
108108
}
109109

eng/common/pipeline-logging-functions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ function Write-LogIssue {
231231
}
232232

233233
Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
234-
}
234+
}

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: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ function Exec-Process([string]$command, [string]$commandArgs) {
9696
}
9797
}
9898

99-
# createSdkLocationFile parameter enables a file being generated under the toolset directory
100-
# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations
101-
# as dot sourcing isn't possible.
102-
function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
99+
function InitializeDotNetCli([bool]$install) {
103100
if (Test-Path variable:global:_DotNetInstallDir) {
104101
return $global:_DotNetInstallDir
105102
}
@@ -149,24 +146,6 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
149146
$env:DOTNET_INSTALL_DIR = $dotnetRoot
150147
}
151148

152-
# Creates a temporary file under the toolset dir.
153-
# The following code block is protecting against concurrent access so that this function can
154-
# be called in parallel.
155-
if ($createSdkLocationFile) {
156-
do {
157-
$sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName())
158-
}
159-
until (!(Test-Path $sdkCacheFileTemp))
160-
Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot
161-
162-
try {
163-
Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt'
164-
} catch {
165-
# Somebody beat us
166-
Remove-Item -Path $sdkCacheFileTemp
167-
}
168-
}
169-
170149
# Add dotnet to PATH. This prevents any bare invocation of dotnet in custom
171150
# build steps from using anything other than what we've downloaded.
172151
# It also ensures that VS msbuild will use the downloaded sdk targets.
@@ -205,7 +184,14 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
205184
InstallDotNet $dotnetRoot $version $architecture
206185
}
207186

208-
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+
209195
$installScript = GetDotNetInstallScript $dotnetRoot
210196
$installParameters = @{
211197
Version = $version
@@ -220,7 +206,7 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
220206
& $installScript @installParameters
221207
}
222208
catch {
223-
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from public location."
209+
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
224210

225211
# Only the runtime can be installed from a custom [private] location.
226212
if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
@@ -236,7 +222,7 @@ function InstallDotNet([string] $dotnetRoot, [string] $version, [string] $archit
236222
& $installScript @installParameters
237223
}
238224
catch {
239-
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
225+
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
240226
ExitWithExitCode 1
241227
}
242228
} else {
@@ -298,11 +284,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
298284
$vsMajorVersion = $vsMinVersion.Major
299285
$xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha"
300286
}
301-
302-
$vsInstallDir = $null
303-
if ($xcopyMSBuildVersion.Trim() -ine "none") {
304-
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
305-
}
287+
288+
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
306289
if ($vsInstallDir -eq $null) {
307290
throw "Unable to find Visual Studio that has required version and components installed"
308291
}

0 commit comments

Comments
 (0)