Skip to content

Commit 14efea2

Browse files
authored
Merge pull request #2219 from dotnet-maestro-bot/merge/release/3.0-to-master
[automated] Merge branch 'release/3.0' => 'master'
2 parents f8d29bc + 836085b commit 14efea2

File tree

13 files changed

+655
-63
lines changed

13 files changed

+655
-63
lines changed

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@
7676
</Dependency>
7777
</ProductDependencies>
7878
<ToolsetDependencies>
79-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19416.16">
79+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19421.1">
8080
<Uri>https://github.com/dotnet/arcade</Uri>
81-
<Sha>0e36c2410b72166a1b9a67142e652225e22feada</Sha>
81+
<Sha>7aa107d818fe87e627154c0331d6de5d47f39a45</Sha>
8282
</Dependency>
83-
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19416.16">
83+
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19421.1">
8484
<Uri>https://github.com/dotnet/arcade</Uri>
85-
<Sha>0e36c2410b72166a1b9a67142e652225e22feada</Sha>
85+
<Sha>7aa107d818fe87e627154c0331d6de5d47f39a45</Sha>
8686
</Dependency>
87-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19416.16">
87+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19421.1">
8888
<Uri>https://github.com/dotnet/arcade</Uri>
89-
<Sha>0e36c2410b72166a1b9a67142e652225e22feada</Sha>
89+
<Sha>7aa107d818fe87e627154c0331d6de5d47f39a45</Sha>
9090
</Dependency>
9191
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-alpha1.19409.9" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
9292
<Uri>https://github.com/dotnet/corefx</Uri>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<!-- Workaround https://github.com/dotnet/cli/issues/10528-->
6262
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-alpha1.19409.9</MicrosoftNETCorePlatformsPackageVersion>
6363
<!-- Packages from dotnet/arcade -->
64-
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19416.16</MicrosoftDotNetGenAPIPackageVersion>
64+
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19421.1</MicrosoftDotNetGenAPIPackageVersion>
6565
<!-- Packages from dotnet/roslyn -->
6666
<MicrosoftNetCompilersToolsetVersion>3.4.0-beta1-19420-02</MicrosoftNetCompilersToolsetVersion>
6767
</PropertyGroup>

eng/common/post-build/sourcelink-validation.ps1

Lines changed: 56 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
param(
22
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored
33
[Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation
4-
[Parameter(Mandatory=$true)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade
5-
[Parameter(Mandatory=$true)][string] $GHCommit, # GitHub commit SHA used to build the packages
4+
[Parameter(Mandatory=$false)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade
5+
[Parameter(Mandatory=$false)][string] $GHCommit, # GitHub commit SHA used to build the packages
66
[Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use
77
)
88

@@ -13,6 +13,12 @@ param(
1313
# all files present in the repo at a specific commit point.
1414
$global:RepoFiles = @{}
1515

16+
# Maximum number of jobs to run in parallel
17+
$MaxParallelJobs = 6
18+
19+
# Wait time between check for system load
20+
$SecondsBetweenLoadChecks = 10
21+
1622
$ValidatePackage = {
1723
param(
1824
[string] $PackagePath # Full path to a Symbols.NuGet package
@@ -22,8 +28,8 @@ $ValidatePackage = {
2228

2329
# Ensure input file exist
2430
if (!(Test-Path $PackagePath)) {
25-
Write-PipelineTaskError "Input file does not exist: $PackagePath"
26-
ExitWithExitCode 1
31+
Write-Host "Input file does not exist: $PackagePath"
32+
return 1
2733
}
2834

2935
# Extensions for which we'll look for SourceLink information
@@ -38,7 +44,7 @@ $ValidatePackage = {
3844

3945
Add-Type -AssemblyName System.IO.Compression.FileSystem
4046

41-
[System.IO.Directory]::CreateDirectory($ExtractPath);
47+
[System.IO.Directory]::CreateDirectory($ExtractPath) | Out-Null
4248

4349
try {
4450
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
@@ -138,62 +144,86 @@ $ValidatePackage = {
138144

139145
if ($FailedFiles -eq 0) {
140146
Write-Host "Passed."
147+
return 0
141148
}
142149
else {
143-
Write-PipelineTaskError "$PackagePath has broken SourceLink links."
150+
Write-Host "$PackagePath has broken SourceLink links."
151+
return 1
144152
}
145153
}
146154

147155
function ValidateSourceLinkLinks {
148-
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
156+
if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
149157
if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) {
150-
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>"
158+
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
151159
ExitWithExitCode 1
152160
}
153161
else {
154162
$GHRepoName = $GHRepoName -replace '^([^\s-]+)-([^\s]+)$', '$1/$2';
155163
}
156164
}
157165

158-
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
159-
Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string"
166+
if ($GHCommit -ne "" -and !($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
167+
Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
160168
ExitWithExitCode 1
161169
}
162170

163-
$RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
164-
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
171+
if ($GHRepoName -ne "" -and $GHCommit -ne "") {
172+
$RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
173+
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
165174

166-
try {
167-
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
168-
$Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree
175+
try {
176+
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
177+
$Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree
169178

170-
foreach ($file in $Data) {
171-
$Extension = [System.IO.Path]::GetExtension($file.path)
179+
foreach ($file in $Data) {
180+
$Extension = [System.IO.Path]::GetExtension($file.path)
172181

173-
if ($CodeExtensions.Contains($Extension)) {
174-
$RepoFiles[$file.path] = 1
182+
if ($CodeExtensions.Contains($Extension)) {
183+
$RepoFiles[$file.path] = 1
184+
}
175185
}
176186
}
187+
catch {
188+
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching."
189+
}
177190
}
178-
catch {
179-
Write-PipelineTaskError "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
180-
Write-Host $_
181-
ExitWithExitCode 1
191+
elseif ($GHRepoName -ne "" -or $GHCommit -ne "") {
192+
Write-Host "For using the http caching mechanism both GHRepoName and GHCommit should be informed."
182193
}
183194

184195
if (Test-Path $ExtractPath) {
185196
Remove-Item $ExtractPath -Force -Recurse -ErrorAction SilentlyContinue
186197
}
187198

188199
# Process each NuGet package in parallel
189-
$Jobs = @()
190200
Get-ChildItem "$InputPath\*.symbols.nupkg" |
191201
ForEach-Object {
192-
$Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName
202+
Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null
203+
$NumJobs = @(Get-Job -State 'Running').Count
204+
205+
while ($NumJobs -ge $MaxParallelJobs) {
206+
Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again."
207+
sleep $SecondsBetweenLoadChecks
208+
$NumJobs = @(Get-Job -State 'Running').Count
209+
}
210+
211+
foreach ($Job in @(Get-Job -State 'Completed')) {
212+
Receive-Job -Id $Job.Id
213+
Remove-Job -Id $Job.Id
214+
}
193215
}
194216

217+
$ValidationFailures = 0
195218
foreach ($Job in $Jobs) {
196-
Wait-Job -Id $Job.Id | Receive-Job
219+
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
220+
if ($jobResult -ne "0") {
221+
$ValidationFailures++
222+
}
223+
}
224+
if ($ValidationFailures -gt 0) {
225+
Write-PipelineTaskError " $ValidationFailures package(s) failed validation."
226+
ExitWithExitCode 1
197227
}
198228
}
199229

eng/common/templates/post-build/channels/netcore-dev-5.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ parameters:
22
enableSymbolValidation: true
33
symbolPublishingAdditionalParameters: ''
44
artifactsPublishingAdditionalParameters: ''
5+
publishInstallersAndChecksums: false
56

67
stages:
78
- stage: NetCore_Dev5_Publish
@@ -101,7 +102,12 @@ stages:
101102
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
102103
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
103104
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
104-
/p:Configuration=Release
105+
/p:Configuration=Release
106+
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
107+
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
108+
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
109+
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
110+
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
105111
${{ parameters.artifactsPublishingAdditionalParameters }}
106112

107113
- task: NuGetCommand@2

eng/common/templates/post-build/channels/netcore-tools-latest.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ parameters:
22
enableSymbolValidation: true
33
symbolPublishingAdditionalParameters: ''
44
artifactsPublishingAdditionalParameters: ''
5+
publishInstallersAndChecksums: false
56

67
stages:
78
- stage: NetCore_Tools_Latest_Publish
@@ -101,7 +102,12 @@ stages:
101102
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
102103
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
103104
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
104-
/p:Configuration=Release
105+
/p:Configuration=Release
106+
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
107+
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
108+
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
109+
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
110+
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
105111
${{ parameters.artifactsPublishingAdditionalParameters }}
106112

107113
- task: NuGetCommand@2

eng/common/templates/post-build/channels/public-dev-release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ parameters:
22
enableSymbolValidation: true
33
symbolPublishingAdditionalParameters: ''
44
artifactsPublishingAdditionalParameters: ''
5+
publishInstallersAndChecksums: false
56

67
stages:
78
- stage: Publish
@@ -102,6 +103,11 @@ stages:
102103
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
103104
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
104105
/p:Configuration=Release
106+
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
107+
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
108+
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
109+
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
110+
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
105111
${{ parameters.artifactsPublishingAdditionalParameters }}
106112

107113
- task: NuGetCommand@2

eng/common/templates/post-build/channels/public-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ stages:
9090
/p:IsInternalBuild=$(IsInternalBuild)
9191
/p:RepositoryName=$(Build.Repository.Name)
9292
/p:CommitSha=$(Build.SourceVersion)
93+
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
9394
/p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName)
9495
/p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1)
9596
/p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url)

eng/common/templates/post-build/channels/public-validation-release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
parameters:
22
artifactsPublishingAdditionalParameters: ''
3+
publishInstallersAndChecksums: false
34

45
stages:
56
- stage: PVR_Publish
@@ -65,7 +66,12 @@ stages:
6566
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
6667
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
6768
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
68-
/p:Configuration=Release
69+
/p:Configuration=Release
70+
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
71+
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
72+
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
73+
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
74+
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
6975
${{ parameters.artifactsPublishingAdditionalParameters }}
7076

7177
- task: NuGetCommand@2

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
variables:
22
- group: Publish-Build-Assets
3+
- group: DotNet-DotNetCli-Storage
34

45
# .NET Core 3 Dev
56
- name: PublicDevRelease_30_Channel_Id
@@ -45,3 +46,9 @@ variables:
4546
value: 3.0.0
4647
- name: SymbolToolVersion
4748
value: 1.0.1
49+
50+
# Default locations for Installers and checksums
51+
- name: ChecksumsBlobFeedUrl
52+
value: https://dotnetcli.blob.core.windows.net/dotnet/index.json
53+
- name: InstallersBlobFeedUrl
54+
value: https://dotnetclichecksums.blob.core.windows.net/dotnet/index.json

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ parameters:
33
enableSigningValidation: true
44
enableSymbolValidation: true
55
enableNugetValidation: true
6+
publishInstallersAndChecksums: false
67
SDLValidationParameters:
78
enable: false
89
params: ''
@@ -85,6 +86,7 @@ stages:
8586
-GHRepoName $(Build.Repository.Name)
8687
-GHCommit $(Build.SourceVersion)
8788
-SourcelinkCliVersion $(SourceLinkCLIVersion)
89+
continueOnError: true
8890

8991
- ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
9092
- template: /eng/common/templates/job/execute-sdl.yml
@@ -96,22 +98,26 @@ stages:
9698
enableSymbolValidation: ${{ parameters.enableSymbolValidation }}
9799
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
98100
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
101+
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
99102

100103
- template: \eng\common\templates\post-build\channels\public-dev-release.yml
101104
parameters:
102105
enableSymbolValidation: ${{ parameters.enableSymbolValidation }}
103106
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
104107
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
108+
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
105109

106110
- template: \eng\common\templates\post-build\channels\netcore-tools-latest.yml
107111
parameters:
108112
enableSymbolValidation: ${{ parameters.enableSymbolValidation }}
109113
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
110114
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
115+
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
111116

112117
- template: \eng\common\templates\post-build\channels\public-validation-release.yml
113118
parameters:
114119
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
120+
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
115121

116122
- template: \eng\common\templates\post-build\channels\public-release.yml
117123
parameters:

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
},
1313
"msbuild-sdks": {
14-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19416.16",
15-
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19416.16"
14+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19421.1",
15+
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19421.1"
1616
}
1717
}

0 commit comments

Comments
 (0)