Skip to content

Commit 2fbd4d8

Browse files
dotnet-maestro[bot]brettfo
authored andcommitted
Update dependencies from https://github.com/dotnet/arcade build 20191203.17 (#7933)
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19603.17
1 parent c4d3a44 commit 2fbd4d8

File tree

8 files changed

+103
-67
lines changed

8 files changed

+103
-67
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.19602.4">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19603.17">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>9d34fd008e754e1ada35c8b6bc3694e7a90b4ed7</Sha>
8+
<Sha>b902fd6b6948e689a5128fa6d94dc7de13e6af84</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

eng/common/SetupNugetSources.ps1

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

@@ -94,41 +94,48 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
9494
}
9595
}
9696

97-
try {
98-
if (!(Test-Path $ConfigFile -PathType Leaf)) {
99-
Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile"
97+
if (!(Test-Path $ConfigFile -PathType Leaf)) {
98+
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
99+
ExitWithExitCode 1
100+
}
101+
102+
if (!$Password) {
103+
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
100104
ExitWithExitCode 1
101-
}
105+
}
102106

103-
# Load NuGet.config
104-
$doc = New-Object System.Xml.XmlDocument
105-
$filename = (Get-Item $ConfigFile).FullName
106-
$doc.Load($filename)
107+
# Load NuGet.config
108+
$doc = New-Object System.Xml.XmlDocument
109+
$filename = (Get-Item $ConfigFile).FullName
110+
$doc.Load($filename)
107111

108-
# Get reference to <PackageSources> or create one if none exist already
109-
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
110-
if ($sources -eq $null) {
111-
$sources = $doc.CreateElement("packageSources")
112-
$doc.DocumentElement.AppendChild($sources) | Out-Null
113-
}
112+
# Get reference to <PackageSources> or create one if none exist already
113+
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
114+
if ($sources -eq $null) {
115+
$sources = $doc.CreateElement("packageSources")
116+
$doc.DocumentElement.AppendChild($sources) | Out-Null
117+
}
114118

115-
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
116-
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
117-
if ($creds -eq $null) {
118-
$creds = $doc.CreateElement("packageSourceCredentials")
119-
$doc.DocumentElement.AppendChild($creds) | Out-Null
120-
}
119+
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
120+
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
121+
if ($creds -eq $null) {
122+
$creds = $doc.CreateElement("packageSourceCredentials")
123+
$doc.DocumentElement.AppendChild($creds) | Out-Null
124+
}
121125

122-
# Insert credential nodes for Maestro's private feeds
123-
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
126+
# Insert credential nodes for Maestro's private feeds
127+
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
124128

129+
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
130+
if ($dotnet3Source -ne $null) {
125131
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
126132
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
127-
128-
$doc.Save($filename)
129133
}
130-
catch {
131-
Write-Host $_.ScriptStackTrace
132-
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
133-
ExitWithExitCode 1
134+
135+
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
136+
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
134139
}
140+
141+
$doc.Save($filename)

eng/common/SetupNugetSources.sh

Lines changed: 55 additions & 23 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-
Write-PipelineTelemetryError -Category 'Build' -Message "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')
119+
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\" />"
93125

94-
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
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
117149
done

eng/common/build.ps1

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ 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+
6567
function InitializeCustomToolset {
6668
if (-not $restore) {
6769
return
@@ -113,21 +115,14 @@ function Build {
113115
}
114116

115117
try {
116-
. $PSScriptRoot\tools.ps1
117-
118118
if ($clean) {
119119
if (Test-Path $ArtifactsDir) {
120120
Remove-Item -Recurse -Force $ArtifactsDir
121121
Write-Host 'Artifacts directory deleted.'
122122
}
123123
exit 0
124124
}
125-
126-
if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) {
127-
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message 'Eng/common/tools.ps1 returned a non-zero exit code.'
128-
ExitWithExitCode $LastExitCode
129-
}
130-
125+
131126
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
132127
Print-Usage
133128
exit 0

eng/common/init-tools-native.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,16 @@ try {
113113
}
114114
$toolInstallationFailure = $true
115115
} else {
116-
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $errMsg
116+
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
117+
Write-Host $errMsg
117118
exit 1
118119
}
119120
}
120121
}
121122

122123
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
123-
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools bootstrap failed'
124+
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
125+
Write-Host 'Native tools bootstrap failed'
124126
exit 1
125127
}
126128
}

eng/common/native/install-tool.ps1

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

eng/common/pipeline-logging-functions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function Write-PipelineTaskError {
8585
[switch]$AsOutput,
8686
[bool]$IsMultiJobVariable=$true)
8787

88-
if(-Not (Test-Path variable:ci) -Or !$ci) {
88+
if((Test-Path variable:ci) -And $ci) {
8989
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
9090
'variable' = $Name
9191
'isSecret' = $Secret

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
"msbuild-sdks": {
13-
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19602.4",
13+
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19603.17",
1414
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
1515
}
1616
}

0 commit comments

Comments
 (0)