Skip to content

Commit 31c5849

Browse files
committed
Merge in 'release/3.1' changes
2 parents 20fb065 + dc62591 commit 31c5849

16 files changed

+150
-76
lines changed

eng/Version.Details.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@
6767
<Uri>https://github.com/dotnet/core-setup</Uri>
6868
<Sha>1a04dd08e56bf52e88668c1ef2bd3f630ad442a5</Sha>
6969
</Dependency>
70-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.22314.5">
70+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.22505.4">
7171
<Uri>https://github.com/dotnet/arcade</Uri>
72-
<Sha>fe57b3babcfc203dd61b7229b54d399b2e3f3c72</Sha>
72+
<Sha>ce5a281156dfae3c050e63c1f288b6a488e978fe</Sha>
7373
</Dependency>
74-
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="1.0.0-beta.22314.5">
74+
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="1.0.0-beta.22505.4">
7575
<Uri>https://github.com/dotnet/arcade</Uri>
76-
<Sha>fe57b3babcfc203dd61b7229b54d399b2e3f3c72</Sha>
76+
<Sha>ce5a281156dfae3c050e63c1f288b6a488e978fe</Sha>
7777
</Dependency>
7878
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.1.3" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
7979
<Uri>https://github.com/dotnet/corefx</Uri>
@@ -99,17 +99,17 @@
9999
<Uri>https://github.com/dotnet/coreclr</Uri>
100100
<Sha>c2e8c9f71737d87a95610851587e2a1eaf18c91c</Sha>
101101
</Dependency>
102-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.22314.5">
102+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.22505.4">
103103
<Uri>https://github.com/dotnet/arcade</Uri>
104-
<Sha>fe57b3babcfc203dd61b7229b54d399b2e3f3c72</Sha>
104+
<Sha>ce5a281156dfae3c050e63c1f288b6a488e978fe</Sha>
105105
</Dependency>
106-
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="1.0.0-beta.22314.5">
106+
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="1.0.0-beta.22505.4">
107107
<Uri>https://github.com/dotnet/arcade</Uri>
108-
<Sha>fe57b3babcfc203dd61b7229b54d399b2e3f3c72</Sha>
108+
<Sha>ce5a281156dfae3c050e63c1f288b6a488e978fe</Sha>
109109
</Dependency>
110-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.22314.5">
110+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.22505.4">
111111
<Uri>https://github.com/dotnet/arcade</Uri>
112-
<Sha>fe57b3babcfc203dd61b7229b54d399b2e3f3c72</Sha>
112+
<Sha>ce5a281156dfae3c050e63c1f288b6a488e978fe</Sha>
113113
</Dependency>
114114
<Dependency Name="System.Resources.Extensions" Version="4.7.1" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
115115
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-corefx</Uri>

eng/Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
</PropertyGroup>
5353
<!-- Packages that come from https://github.com/dotnet/arcade -->
5454
<PropertyGroup>
55-
<MicrosoftDotNetApiCompatVersion>1.0.0-beta.22314.5</MicrosoftDotNetApiCompatVersion>
56-
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.22314.5</MicrosoftDotNetCodeAnalysisPackageVersion>
57-
<MicrosoftDotNetGenAPIVersion>1.0.0-beta.22314.5</MicrosoftDotNetGenAPIVersion>
55+
<MicrosoftDotNetApiCompatVersion>1.0.0-beta.22505.4</MicrosoftDotNetApiCompatVersion>
56+
<MicrosoftDotNetCodeAnalysisPackageVersion>1.0.0-beta.22505.4</MicrosoftDotNetCodeAnalysisPackageVersion>
57+
<MicrosoftDotNetGenAPIVersion>1.0.0-beta.22505.4</MicrosoftDotNetGenAPIVersion>
5858
</PropertyGroup>
5959
<!-- Packages that come from https://github.com/dotnet/corefxlab -->
6060
<PropertyGroup>

eng/common/build.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Param(
2424
[switch] $help,
2525
[string] $runtimeSourceFeed = "",
2626
[string] $runtimeSourceFeedKey = "",
27+
[switch] $nativeToolsOnMachine,
2728
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
2829
)
2930

@@ -60,6 +61,7 @@ function Print-Usage() {
6061
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
6162
Write-Host " -runtimeSourceFeed <value> Alternate feed source for restoring .NET Runtimes and SDKs"
6263
Write-Host " -runtimeSourceFeedKey <value> Key value for non-public values of runtimeSourceFeed"
64+
Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
6365
Write-Host ""
6466

6567
Write-Host "Command line arguments not listed above are passed thru to msbuild."
@@ -134,6 +136,9 @@ try {
134136
. $configureToolsetScript
135137
}
136138

139+
if ($nativeToolsOnMachine) {
140+
$env:NativeToolsOnMachine = $true
141+
}
137142
if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) {
138143
InitializeNativeTools
139144
}

eng/common/darc-init.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ param (
1010
function InstallDarcCli ($darcVersion, $toolpath) {
1111
$darcCliPackageName = 'microsoft.dotnet.darc'
1212

13-
$dotnetRoot = InitializeDotNetCli -install:$true
14-
$dotnet = "$dotnetRoot\dotnet.exe"
13+
$dotnet = "dotnet"
1514
$toolList = & "$dotnet" tool list -g
1615

1716
if ($toolList -like "*$darcCliPackageName*") {

eng/common/init-tools-native.ps1

Lines changed: 96 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Wait time between retry attempts in seconds
3131
.PARAMETER GlobalJsonFile
3232
File path to global.json file
3333
34+
.PARAMETER PathPromotion
35+
Optional switch to enable either promote native tools specified in the global.json to the path (in Azure Pipelines)
36+
or break the build if a native tool is not found on the path (on a local dev machine)
37+
3438
.NOTES
3539
#>
3640
[CmdletBinding(PositionalBinding=$false)]
@@ -41,7 +45,8 @@ Param (
4145
[switch] $Force = $False,
4246
[int] $DownloadRetries = 5,
4347
[int] $RetryWaitTimeInSeconds = 30,
44-
[string] $GlobalJsonFile
48+
[string] $GlobalJsonFile,
49+
[switch] $PathPromotion
4550
)
4651

4752
if (!$GlobalJsonFile) {
@@ -76,53 +81,100 @@ try {
7681
ConvertFrom-Json |
7782
Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue
7883
if ($NativeTools) {
79-
$NativeTools.PSObject.Properties | ForEach-Object {
80-
$ToolName = $_.Name
81-
$ToolVersion = $_.Value
82-
$LocalInstallerArguments = @{ ToolName = "$ToolName" }
83-
$LocalInstallerArguments += @{ InstallPath = "$InstallBin" }
84-
$LocalInstallerArguments += @{ BaseUri = "$BaseUri" }
85-
$LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" }
86-
$LocalInstallerArguments += @{ Version = "$ToolVersion" }
87-
88-
if ($Verbose) {
89-
$LocalInstallerArguments += @{ Verbose = $True }
90-
}
91-
if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {
92-
if($Force) {
93-
$LocalInstallerArguments += @{ Force = $True }
94-
}
95-
}
96-
if ($Clean) {
97-
$LocalInstallerArguments += @{ Clean = $True }
98-
}
99-
100-
Write-Verbose "Installing $ToolName version $ToolVersion"
101-
Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'"
102-
& $InstallerPath @LocalInstallerArguments
103-
if ($LASTEXITCODE -Ne "0") {
104-
$errMsg = "$ToolName installation failed"
105-
if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
106-
$showNativeToolsWarning = $true
107-
if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) {
108-
$showNativeToolsWarning = $false
84+
if ($PathPromotion -eq $True) {
85+
if ($env:SYSTEM_TEAMPROJECT) { # check to see if we're in an Azure pipelines build
86+
$NativeTools.PSObject.Properties | ForEach-Object {
87+
$ToolName = $_.Name
88+
$ToolVersion = $_.Value
89+
$InstalledTools = @{}
90+
91+
if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) {
92+
if ($ToolVersion -eq "latest") {
93+
$ToolVersion = ""
94+
}
95+
$ArcadeToolsDirectory = "C:\arcade-tools"
96+
if (-not (Test-Path $ArcadeToolsDirectory)) {
97+
Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed."
98+
exit 1
10999
}
110-
if ($showNativeToolsWarning) {
111-
Write-Warning $errMsg
100+
$ToolDirectory = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending)[0]
101+
if ([string]::IsNullOrWhiteSpace($ToolDirectory)) {
102+
Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image."
103+
exit 1
112104
}
113-
$toolInstallationFailure = $true
114-
} else {
115-
Write-Error $errMsg
116-
exit 1
105+
$BinPathFile = "$($ToolDirectory.FullName)\binpath.txt"
106+
if (-not (Test-Path -Path "$BinPathFile")) {
107+
Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool."
108+
exit 1
109+
}
110+
$BinPath = Get-Content "$BinPathFile"
111+
$ToolPath = Convert-Path -Path $BinPath
112+
Write-Host "Adding $ToolName to the path ($ToolPath)..."
113+
Write-Host "##vso[task.prependpath]$ToolPath"
114+
$env:PATH = "$ToolPath;$env:PATH"
115+
$InstalledTools += @{ $ToolName = $ToolDirectory.FullName }
116+
}
117+
}
118+
return $InstalledTools
119+
} else {
120+
$NativeTools.PSObject.Properties | ForEach-Object {
121+
$ToolName = $_.Name
122+
$ToolVersion = $_.Value
123+
124+
if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) {
125+
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding."
126+
}
117127
}
128+
exit 0
129+
}
130+
} else {
131+
$NativeTools.PSObject.Properties | ForEach-Object {
132+
$ToolName = $_.Name
133+
$ToolVersion = $_.Value
134+
$LocalInstallerArguments = @{ ToolName = "$ToolName" }
135+
$LocalInstallerArguments += @{ InstallPath = "$InstallBin" }
136+
$LocalInstallerArguments += @{ BaseUri = "$BaseUri" }
137+
$LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" }
138+
$LocalInstallerArguments += @{ Version = "$ToolVersion" }
139+
140+
if ($Verbose) {
141+
$LocalInstallerArguments += @{ Verbose = $True }
142+
}
143+
if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {
144+
if($Force) {
145+
$LocalInstallerArguments += @{ Force = $True }
146+
}
147+
}
148+
if ($Clean) {
149+
$LocalInstallerArguments += @{ Clean = $True }
150+
}
151+
152+
Write-Verbose "Installing $ToolName version $ToolVersion"
153+
Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'"
154+
& $InstallerPath @LocalInstallerArguments
155+
if ($LASTEXITCODE -Ne "0") {
156+
$errMsg = "$ToolName installation failed"
157+
if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
158+
$showNativeToolsWarning = $true
159+
if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) {
160+
$showNativeToolsWarning = $false
161+
}
162+
if ($showNativeToolsWarning) {
163+
Write-Warning $errMsg
164+
}
165+
$toolInstallationFailure = $true
166+
} else {
167+
Write-Error $errMsg
168+
exit 1
169+
}
170+
}
171+
}
172+
173+
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
174+
exit 1
118175
}
119176
}
120-
121-
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
122-
exit 1
123-
}
124-
}
125-
else {
177+
} else {
126178
Write-Host "No native tools defined in global.json"
127179
exit 0
128180
}
@@ -134,7 +186,7 @@ try {
134186
Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
135187
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
136188
}
137-
else {
189+
elseif (-not ($PathPromotion)) {
138190
Write-Error "Native tools install directory does not exist, installation failed"
139191
exit 1
140192
}

eng/common/templates/job/execute-sdl.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
variables:
2020
- group: DotNet-VSTS-Bot
2121
pool:
22-
vmImage: windows-2019
22+
name: NetCore1ESPool-Svc-Internal
23+
demands: ImageOverride -equals windows.vs2019.amd64
2324
steps:
2425
- checkout: self
2526
clean: true

eng/common/templates/job/onelocbuild.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ parameters:
44

55
# Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool
66
pool:
7-
vmImage: windows-2019
7+
name: NetCore1ESPool-Svc-Internal
8+
demands: ImageOverride -equals windows.vs2019.amd64
89

910
CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex
1011
GithubPat: $(BotAccount-dotnet-bot-repo-PAT)

eng/common/templates/jobs/jobs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ jobs:
7474
- ${{ each job in parameters.jobs }}:
7575
- ${{ job.job }}
7676
pool:
77-
vmImage: windows-2019
77+
name: NetCore1ESPool-Svc-Internal
78+
demands: ImageOverride -equals windows.vs2019.amd64
7879
runAsPublic: ${{ parameters.runAsPublic }}
7980
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
8081
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
@@ -87,4 +88,5 @@ jobs:
8788
dependsOn:
8889
- Asset_Registry_Publish
8990
pool:
90-
vmImage: windows-2019
91+
name: NetCore1ESPool-Svc-Internal
92+
demands: ImageOverride -equals windows.vs2019.amd64

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ stages:
2424
variables:
2525
- group: DotNet-Symbol-Server-Pats
2626
pool:
27-
vmImage: 'windows-2019'
27+
name: NetCore1ESPool-Svc-Internal
28+
demands: ImageOverride -equals windows.vs2019.amd64
2829
steps:
2930
# This is necessary whenever we want to publish/restore to an AzDO private feed
3031
- task: NuGetAuthenticate@0
@@ -67,7 +68,8 @@ stages:
6768
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
6869
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
6970
pool:
70-
vmImage: 'windows-2019'
71+
name: NetCore1ESPool-Svc-Internal
72+
demands: ImageOverride -equals windows.vs2019.amd64
7173
steps:
7274
- task: DownloadBuildArtifacts@0
7375
displayName: Download Package Artifacts

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ stages:
2525
variables:
2626
- group: DotNet-Symbol-Server-Pats
2727
pool:
28-
vmImage: 'windows-2019'
28+
name: NetCore1ESPool-Svc-Internal
29+
demands: ImageOverride -equals windows.vs2019.amd64
2930
steps:
3031
- task: DownloadBuildArtifacts@0
3132
displayName: Download Blob Artifacts
@@ -74,7 +75,8 @@ stages:
7475
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
7576
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
7677
pool:
77-
vmImage: 'windows-2019'
78+
name: NetCore1ESPool-Svc-Internal
79+
demands: ImageOverride -equals windows.vs2019.amd64
7880
steps:
7981
- task: DownloadBuildArtifacts@0
8082
displayName: Download Package Artifacts

0 commit comments

Comments
 (0)