From f8eb583d40b39ff59b52adff3cbbfd1c4e9a7d8b Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2020 09:44:02 +0200 Subject: [PATCH] [master] Update dependencies from dotnet/arcade (#8726) * Update dependencies from https://github.com/dotnet/arcade build 20200924.4 Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk From Version 5.0.0-beta.20471.1 -> To Version 5.0.0-beta.20474.4 Dependency coherency updates Microsoft.WindowsDesktop.App.Ref,Microsoft.WindowsDesktop.App,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0,dotnet-dev-certs,dotnet-user-secrets,dotnet-watch,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.FSharp.Compiler,Microsoft.NET.Test.Sdk,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks From Version 5.0.0-rc.2.20474.5 -> To Version 5.0.0-rc.1.20417.4 (parent: Microsoft.NET.Sdk * Update dependencies from https://github.com/dotnet/arcade build 20200928.3 Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk From Version 5.0.0-beta.20471.1 -> To Version 5.0.0-beta.20478.3 Dependency coherency updates Microsoft.WindowsDesktop.App.Ref,Microsoft.WindowsDesktop.App,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0,dotnet-dev-certs,dotnet-user-secrets,dotnet-watch,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.FSharp.Compiler,Microsoft.NET.Test.Sdk,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks From Version 5.0.0-rc.2.20474.5 -> To Version 5.0.0-rc.1.20417.4 (parent: Microsoft.NET.Sdk * Update dependencies from https://github.com/dotnet/arcade build 20201006.7 Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk From Version 5.0.0-beta.20471.1 -> To Version 5.0.0-beta.20506.7 Dependency coherency updates Microsoft.WindowsDesktop.App.Ref,Microsoft.WindowsDesktop.App,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0,dotnet-dev-certs,dotnet-user-secrets,dotnet-watch,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.FSharp.Compiler,Microsoft.NET.Test.Sdk,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks,Microsoft.SourceLink.GitHub,XliffTasks From Version 5.0.0-rc.2.20474.5 -> To Version 5.0.0-rc.1.20417.4 (parent: Microsoft.NET.Sdk * Update dependencies from https://github.com/dotnet/arcade build 20201009.12 Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk From Version 5.0.0-beta.20471.1 -> To Version 6.0.0-beta.20509.12 Dependency coherency updates Microsoft.WindowsDesktop.App.Ref,Microsoft.WindowsDesktop.App,Microsoft.AspNetCore.App.Ref,Microsoft.AspNetCore.App.Ref.Internal,Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0,dotnet-dev-certs,dotnet-user-secrets,dotnet-watch,Microsoft.Dotnet.WinForms.ProjectTemplates,Microsoft.WindowsDesktop.App.Runtime.win-x64,Microsoft.DotNet.Wpf.ProjectTemplates,Microsoft.FSharp.Compiler,Microsoft.NET.Test.Sdk,Microsoft.NET.ILLink.Tasks,Microsoft.Net.Compilers.Toolset,Microsoft.Build,NuGet.Build.Tasks,Microsoft.SourceLink.GitHub,XliffTasks From Version 5.0.0-rc.2.20474.5 -> To Version 5.0.0-rc.1.20417.4 (parent: Microsoft.NET.Sdk * Update dependencies from https://github.com/dotnet/arcade build 20201020.8 Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk From Version 5.0.0-beta.20471.1 -> To Version 6.0.0-beta.20520.8 Dependency coherency updates Microsoft.SourceLink.GitHub,XliffTasks From Version 1.1.0-beta-20464-02 -> To Version 1.1.0-beta-20519-02 (parent: Microsoft.DotNet.Arcade.Sdk * Update FileInfoAssertions.cs * Update FileInfoAssertions.cs * Use tasks provided by Microsoft.DotNet.Build.Tasks.Installers when provided. Co-authored-by: dotnet-maestro[bot] Co-authored-by: Viktor Hofer Co-authored-by: Jeremy Koritzinsky --- eng/Version.Details.xml | 16 +- eng/Versions.props | 2 +- eng/common/cross/build-rootfs.sh | 1 + eng/common/cross/toolchain.cmake | 4 + eng/common/performance/crossgen_perf.proj | 27 +- eng/common/performance/performance-setup.sh | 1 + .../post-build/sourcelink-validation.ps1 | 15 +- eng/common/templates/job/job.yml | 20 +- .../templates/post-build/post-build.yml | 313 +++++++++--------- .../templates/steps/perf-send-to-helix.yml | 2 +- eng/common/templates/steps/send-to-helix.yml | 2 +- eng/common/tools.ps1 | 4 +- eng/common/tools.sh | 2 + global.json | 4 +- src/core-sdk-tasks/GenerateGuidFromName.cs | 15 +- src/core-sdk-tasks/GenerateMsiVersion.cs | 41 --- src/redist/targets/BuildCoreSdkTasks.targets | 2 - src/redist/targets/GenerateMSIs.targets | 14 +- .../Assertions/FileInfoAssertions.cs | 11 - 19 files changed, 237 insertions(+), 259 deletions(-) delete mode 100644 src/core-sdk-tasks/GenerateMsiVersion.cs diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 15a24c6e5..bbfecf147 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -140,25 +140,25 @@ - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 7fbf2a7703498067569d07a21776b91e599028e2 - + https://github.com/dotnet/arcade - 0365488709f58e37de6c2180e7fb243203ca0a9c + 7fbf2a7703498067569d07a21776b91e599028e2 https://github.com/dotnet/source-build-reference-packages 639aeb4d76c8b1a6226bf7c4edb34fbdae30e6e1 - + https://github.com/dotnet/sourcelink - 8a3edd1902dbfe3adba65f22e3bb7aa2cc73e97f + 0decb380f1e0f8267259b5ae5d0d1e5102e380a1 - + https://github.com/dotnet/xliff-tasks - 975065e08307a459dc2649b1c852f5c4cafd2f91 + 339b0111cdf8bf4fd3cab63c9f9bfbf6db5325b4 diff --git a/eng/Versions.props b/eng/Versions.props index b3b9668f6..ae21b749a 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -20,7 +20,7 @@ - 5.0.0-beta.20472.36 + 6.0.0-beta.20520.8 diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index ffdff3854..a841c64f3 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -329,6 +329,7 @@ elif [[ -n $__CodeName ]]; then chroot $__RootfsDir apt-get -f -y install chroot $__RootfsDir apt-get -y install $__UbuntuPackages chroot $__RootfsDir symlinks -cr /usr + chroot $__RootfsDir apt clean if [ $__SkipUnmount == 0 ]; then umount $__RootfsDir/* || true diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 137736c0a..8b437d8ad 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -139,6 +139,10 @@ function(add_toolchain_linker_flag Flag) set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE) endfunction() +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib/${TOOLCHAIN}") + add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}") +endif() if(TARGET_ARCH_NAME STREQUAL "armel") if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only diff --git a/eng/common/performance/crossgen_perf.proj b/eng/common/performance/crossgen_perf.proj index 426492038..3b8dfc2b1 100644 --- a/eng/common/performance/crossgen_perf.proj +++ b/eng/common/performance/crossgen_perf.proj @@ -27,11 +27,18 @@ - - - - - + + + + + + + + + + + + @@ -51,6 +58,13 @@ + + + $(WorkItemDirectory) + $(Python) $(Crossgen2Directory)test.py crossgen2 --core-root $(CoreRoot) --single %(Identity) --singlethreaded True + + + @@ -60,6 +74,9 @@ 4:00 + + 4:00 + $(WorkItemDirectory) $(Python) $(Crossgen2Directory)test.py crossgen2 --core-root $(CoreRoot) --composite $(Crossgen2Directory)framework-r2r.dll.rsp diff --git a/eng/common/performance/performance-setup.sh b/eng/common/performance/performance-setup.sh index 806e56c61..9c0f6c909 100755 --- a/eng/common/performance/performance-setup.sh +++ b/eng/common/performance/performance-setup.sh @@ -211,6 +211,7 @@ if [[ "$wasm_runtime_loc" != "" ]]; then fi if [[ "$mono_dotnet" != "" ]] && [[ "$monointerpreter" == "true" ]]; then + configurations="$configurations LLVM=$llvm MonoInterpreter=$monointerpreter MonoAOT=$monoaot" extra_benchmark_dotnet_arguments="$extra_benchmark_dotnet_arguments --category-exclusion-filter NoInterpreter NoMono" fi diff --git a/eng/common/post-build/sourcelink-validation.ps1 b/eng/common/post-build/sourcelink-validation.ps1 index c7e7ae67d..1728b742b 100644 --- a/eng/common/post-build/sourcelink-validation.ps1 +++ b/eng/common/post-build/sourcelink-validation.ps1 @@ -161,9 +161,12 @@ $ValidatePackage = { function CheckJobResult( $result, $packagePath, - [ref]$ValidationFailures) { - if ($jobResult.result -ne '0') { - Write-PipelineTelemetryError -Category 'SourceLink' -Message "$packagePath has broken SourceLink links." + [ref]$ValidationFailures, + [switch]$logErrors) { + if ($result -ne '0') { + if ($logError) { + Write-PipelineTelemetryError -Category 'SourceLink' -Message "$packagePath has broken SourceLink links." + } $ValidationFailures.Value++ } } @@ -228,16 +231,14 @@ function ValidateSourceLinkLinks { foreach ($Job in @(Get-Job -State 'Completed')) { $jobResult = Wait-Job -Id $Job.Id | Receive-Job - CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) -LogErrors Remove-Job -Id $Job.Id } } foreach ($Job in @(Get-Job)) { $jobResult = Wait-Job -Id $Job.Id | Receive-Job - if ($jobResult -ne '0') { - $ValidationFailures++ - } + CheckJobResult $jobResult.result $jobResult.packagePath ([ref]$ValidationFailures) Remove-Job -Id $Job.Id } if ($ValidationFailures -gt 0) { diff --git a/eng/common/templates/job/job.yml b/eng/common/templates/job/job.yml index e78ed9a1c..8e4ce2c28 100644 --- a/eng/common/templates/job/job.yml +++ b/eng/common/templates/job/job.yml @@ -27,6 +27,7 @@ parameters: useBuildManifest: false mergeTestResults: false testRunTitle: '' + testResultsFormat: '' name: '' preSteps: [] runAsPublic: false @@ -131,8 +132,8 @@ jobs: - task: RichCodeNavIndexer@0 displayName: RichCodeNav Upload inputs: - languages: 'csharp' - environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'prod') }} + languages: ${{ coalesce(parameters.richCodeNavigationLanguage, 'csharp') }} + environment: ${{ coalesce(parameters.richCodeNavigationEnvironment, 'production') }} richNavLogOutputDirectory: $(Build.SourcesDirectory)/artifacts/bin continueOnError: true @@ -202,9 +203,9 @@ jobs: continueOnError: true condition: always() - - ${{ if eq(parameters.enablePublishTestResults, 'true') }}: + - ${{ if or(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, 'xunit')) }}: - task: PublishTestResults@2 - displayName: Publish Test Results + displayName: Publish XUnit Test Results inputs: testResultsFormat: 'xUnit' testResultsFiles: '*.xml' @@ -213,6 +214,17 @@ jobs: mergeTestResults: ${{ parameters.mergeTestResults }} continueOnError: true condition: always() + - ${{ if or(eq(parameters.enablePublishTestResults, 'true'), eq(parameters.testResultsFormat, 'vstest')) }}: + - task: PublishTestResults@2 + displayName: Publish TRX Test Results + inputs: + testResultsFormat: 'VSTest' + testResultsFiles: '*.trx' + searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' + testRunTitle: ${{ coalesce(parameters.testRunTitle, parameters.name, '$(System.JobName)') }}-trx + mergeTestResults: ${{ parameters.mergeTestResults }} + continueOnError: true + condition: always() - ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - task: CopyFiles@2 diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index df06f5371..761fb1a29 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -67,175 +67,180 @@ parameters: VSMasterChannelId: 1012 stages: -- stage: Validate - dependsOn: ${{ parameters.validateDependsOn }} - displayName: Validate Build Assets - variables: - - template: common-variables.yml - jobs: - - template: setup-maestro-vars.yml - parameters: - BARBuildId: ${{ parameters.BARBuildId }} - PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} - - - job: - displayName: Post-build Checks - dependsOn: setupMaestroVars - variables: - - name: TargetChannels - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'] ] - pool: - vmImage: 'windows-2019' - steps: - - task: PowerShell@2 - displayName: Maestro Channels Consistency - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 - arguments: -PromoteToChannels "$(TargetChannels)" - -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.NetDev6ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview8ChannelId}},${{parameters.Net5RC1ChannelId}},${{parameters.Net5RC2ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}} - - - job: - displayName: NuGet Validation - dependsOn: setupMaestroVars - condition: eq( ${{ parameters.enableNugetValidation }}, 'true') - pool: - vmImage: 'windows-2019' - variables: - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts - - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 - arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ - -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ - - - job: - displayName: Signing Validation - dependsOn: setupMaestroVars - condition: eq( ${{ parameters.enableSigningValidation }}, 'true') +- ${{ if or(and(le(parameters.publishingInfraVersion, 2), eq(parameters.inline, 'true')), eq( parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: + - stage: Validate + dependsOn: ${{ parameters.validateDependsOn }} + displayName: Validate Build Assets variables: - template: common-variables.yml - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] - pool: - vmImage: 'windows-2019' - steps: - - ${{ if eq(parameters.useBuildManifest, true) }}: + jobs: + - template: setup-maestro-vars.yml + parameters: + BARBuildId: ${{ parameters.BARBuildId }} + PromoteToChannelIds: ${{ parameters.PromoteToChannelIds }} + + - ${{ if and(le(parameters.publishingInfraVersion, 2), eq(parameters.inline, 'true')) }}: + - job: + displayName: Post-build Checks + dependsOn: setupMaestroVars + variables: + - name: TargetChannels + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.TargetChannels'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: PowerShell@2 + displayName: Maestro Channels Consistency + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1 + arguments: -PromoteToChannels "$(TargetChannels)" + -AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.NetDev6ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview8ChannelId}},${{parameters.Net5RC1ChannelId}},${{parameters.Net5RC2ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}},${{parameters.NetCoreSDK314xxChannelId}},${{parameters.NetCoreSDK314xxInternalChannelId}},${{parameters.VS166ChannelId}},${{parameters.VS167ChannelId}},${{parameters.VS168ChannelId}},${{parameters.VSMasterChannelId}} + + - job: + displayName: NuGet Validation + dependsOn: setupMaestroVars + condition: eq( ${{ parameters.enableNugetValidation }}, 'true') + pool: + vmImage: 'windows-2019' + variables: + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + steps: - task: DownloadBuildArtifacts@0 - displayName: Download build manifest + displayName: Download Package Artifacts inputs: buildType: specific buildVersionToDownload: specific project: $(AzDOProjectName) pipeline: $(AzDOPipelineId) buildId: $(AzDOBuildId) - artifactName: BuildManifests - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: PackageArtifacts + artifactName: PackageArtifacts - # This is necessary whenever we want to publish/restore to an AzDO private feed - # Since sdk-task.ps1 tries to restore packages we need to do this authentication here - # otherwise it'll complain about accessing a private feed. - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1 + arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ + -ToolDestinationPath $(Agent.BuildDirectory)/Extract/ - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - # Signing validation will optionally work with the buildmanifest file which is downloaded from - # Azure DevOps above. - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task SigningValidation -restore -msbuildEngine vs - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' - /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' - ${{ parameters.signingValidationAdditionalParameters }} - - - template: ../steps/publish-logs.yml - parameters: - StageLabel: 'Validation' - JobLabel: 'Signing' - - - job: - displayName: SourceLink Validation - dependsOn: setupMaestroVars - condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true') - variables: - - template: common-variables.yml - - name: AzDOProjectName - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] - - name: AzDOPipelineId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] - - name: AzDOBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: specific - buildVersionToDownload: specific - project: $(AzDOProjectName) - pipeline: $(AzDOPipelineId) - buildId: $(AzDOBuildId) - artifactName: BlobArtifacts - - - task: PowerShell@2 - displayName: Validate - inputs: - filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 - arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ - -ExtractPath $(Agent.BuildDirectory)/Extract/ - -GHRepoName $(Build.Repository.Name) - -GHCommit $(Build.SourceVersion) - -SourcelinkCliVersion $(SourceLinkCLIVersion) - continueOnError: true - - - template: /eng/common/templates/job/execute-sdl.yml - parameters: - enable: ${{ parameters.SDLValidationParameters.enable }} + - job: + displayName: Signing Validation dependsOn: setupMaestroVars - additionalParameters: ${{ parameters.SDLValidationParameters.params }} - continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} - artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} - downloadArtifacts: ${{ parameters.SDLValidationParameters.downloadArtifacts }} + condition: eq( ${{ parameters.enableSigningValidation }}, 'true') + variables: + - template: common-variables.yml + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + - ${{ if eq(parameters.useBuildManifest, true) }}: + - task: DownloadBuildArtifacts@0 + displayName: Download build manifest + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: BuildManifests + - task: DownloadBuildArtifacts@0 + displayName: Download Package Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: PackageArtifacts + + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + + # Signing validation will optionally work with the buildmanifest file which is downloaded from + # Azure DevOps above. + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: eng\common\sdk-task.ps1 + arguments: -task SigningValidation -restore -msbuildEngine vs + /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts' + /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt' + ${{ parameters.signingValidationAdditionalParameters }} + + - template: ../steps/publish-logs.yml + parameters: + StageLabel: 'Validation' + JobLabel: 'Signing' + + - job: + displayName: SourceLink Validation + dependsOn: setupMaestroVars + condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true') + variables: + - template: common-variables.yml + - name: AzDOProjectName + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ] + - name: AzDOPipelineId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ] + - name: AzDOBuildId + value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ] + pool: + vmImage: 'windows-2019' + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download Blob Artifacts + inputs: + buildType: specific + buildVersionToDownload: specific + project: $(AzDOProjectName) + pipeline: $(AzDOPipelineId) + buildId: $(AzDOBuildId) + artifactName: BlobArtifacts + + - task: PowerShell@2 + displayName: Validate + inputs: + filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1 + arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/ + -ExtractPath $(Agent.BuildDirectory)/Extract/ + -GHRepoName $(Build.Repository.Name) + -GHCommit $(Build.SourceVersion) + -SourcelinkCliVersion $(SourceLinkCLIVersion) + continueOnError: true + + - template: /eng/common/templates/job/execute-sdl.yml + parameters: + enable: ${{ parameters.SDLValidationParameters.enable }} + dependsOn: setupMaestroVars + additionalParameters: ${{ parameters.SDLValidationParameters.params }} + continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} + artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} + downloadArtifacts: ${{ parameters.SDLValidationParameters.downloadArtifacts }} - ${{ if or(ge(parameters.publishingInfraVersion, 3), eq(parameters.inline, 'false')) }}: - stage: publish_using_darc - dependsOn: Validate + ${{ if or(eq(parameters.enableNugetValidation, 'true'), eq(parameters.enableSigningValidation, 'true'), eq(parameters.enableSourceLinkValidation, 'true'), eq(parameters.SDLValidationParameters.enable, 'true')) }}: + dependsOn: Validate + ${{ if and(ne(parameters.enableNugetValidation, 'true'), ne(parameters.enableSigningValidation, 'true'), ne(parameters.enableSourceLinkValidation, 'true'), ne(parameters.SDLValidationParameters.enable, 'true')) }}: + dependsOn: ${{ parameters.validateDependsOn }} displayName: Publish using Darc variables: - template: common-variables.yml diff --git a/eng/common/templates/steps/perf-send-to-helix.yml b/eng/common/templates/steps/perf-send-to-helix.yml index 8427de59c..a468e92ce 100644 --- a/eng/common/templates/steps/perf-send-to-helix.yml +++ b/eng/common/templates/steps/perf-send-to-helix.yml @@ -11,7 +11,7 @@ parameters: WorkItemDirectory: '' # optional -- a payload directory to zip up and send to Helix; requires WorkItemCommand; incompatible with XUnitProjects CorrelationPayloadDirectory: '' # optional -- a directory to zip up and send to Helix as a correlation payload IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion - DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json + DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases.json EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." diff --git a/eng/common/templates/steps/send-to-helix.yml b/eng/common/templates/steps/send-to-helix.yml index 5eceb4872..bb5f1a929 100644 --- a/eng/common/templates/steps/send-to-helix.yml +++ b/eng/common/templates/steps/send-to-helix.yml @@ -18,7 +18,7 @@ parameters: XUnitRuntimeTargetFramework: '' # optional -- framework to use for the xUnit console runner XUnitRunnerVersion: '' # optional -- version of the xUnit nuget package you wish to use on Helix; required for XUnitProjects IncludeDotNetCli: false # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion - DotNetCliPackageType: '' # optional -- either 'sdk' or 'runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json + DotNetCliPackageType: '' # optional -- either 'sdk', 'runtime' or 'aspnetcore-runtime'; determines whether the sdk or runtime will be sent to Helix; see https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json DotNetCliVersion: '' # optional -- version of the CLI to send to Helix; based on this: https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget." diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 60066083b..9014e0625 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -540,13 +540,15 @@ function GetDefaultMSBuildEngine() { function GetNuGetPackageCachePath() { if ($env:NUGET_PACKAGES -eq $null) { - # Use local cache on CI to ensure deterministic build, + # Use local cache on CI to ensure deterministic build. + # Avoid using the http cache as workaround for https://github.com/NuGet/Home/issues/3116 # use global cache in dev builds to avoid cost of downloading packages. # For directory normalization, see also: https://github.com/NuGet/Home/issues/7968 if ($useGlobalNuGetCache) { $env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages\' } else { $env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages\' + $env:RESTORENOCACHE = $true } } diff --git a/eng/common/tools.sh b/eng/common/tools.sh index c722a0585..b5d63cb1b 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -312,12 +312,14 @@ function InitializeBuildTool { _InitializeBuildToolFramework="netcoreapp2.1" } +# Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 function GetNuGetPackageCachePath { if [[ -z ${NUGET_PACKAGES:-} ]]; then if [[ "$use_global_nuget_cache" == true ]]; then export NUGET_PACKAGES="$HOME/.nuget/packages" else export NUGET_PACKAGES="$repo_root/.packages" + export RESTORENOCACHE=true fi fi diff --git a/global.json b/global.json index de0bc32ff..8337f8bbe 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "5.0.100-rc.1.20452.10", + "dotnet": "5.0.100-rc.2.20479.15", "runtimes": { "dotnet": [ "$(MicrosoftNETCoreAppInternalPackageVersion)" @@ -8,6 +8,6 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20472.36" + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.20520.8" } } diff --git a/src/core-sdk-tasks/GenerateGuidFromName.cs b/src/core-sdk-tasks/GenerateGuidFromName.cs index 3ae08347b..709e4ec64 100644 --- a/src/core-sdk-tasks/GenerateGuidFromName.cs +++ b/src/core-sdk-tasks/GenerateGuidFromName.cs @@ -8,21 +8,8 @@ using Microsoft.Build.Utilities; namespace Microsoft.DotNet.Cli.Build { - public class GenerateGuidFromName : Task + public class GenerateGuidFromName { - [Required] - public string Name { get; set; } - - [Output] - public string OutputGuid { get; set; } - - public override bool Execute() - { - OutputGuid = GenerateGuid(Name).ToString().ToUpper(); - - return true; - } - // Generate a Version 5 (SHA1 Name Based) Guid from a name. public static Guid GenerateGuid(string name) { diff --git a/src/core-sdk-tasks/GenerateMsiVersion.cs b/src/core-sdk-tasks/GenerateMsiVersion.cs deleted file mode 100644 index f257c0f6b..000000000 --- a/src/core-sdk-tasks/GenerateMsiVersion.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Microsoft.DotNet.Cli.Build -{ - public class GenerateMsiVersion : Task - { - [Required] - public int VersionRevision { get; set; } - - [Required] - public int VersionMajor { get; set; } - - [Required] - public int VersionMinor { get; set; } - - [Required] - public int VersionPatch { get; set; } - - [Output] - public string MsiVersion { get; set; } - - public override bool Execute() - { - var buildVersion = new Version() - { - Major = VersionMajor, - Minor = VersionMinor, - Patch = VersionPatch, - VersionRevision = VersionRevision - }; - - MsiVersion = buildVersion.GenerateMsiVersion(); - - return true; - } - } -} diff --git a/src/redist/targets/BuildCoreSdkTasks.targets b/src/redist/targets/BuildCoreSdkTasks.targets index cf37a9f01..2d547dda5 100644 --- a/src/redist/targets/BuildCoreSdkTasks.targets +++ b/src/redist/targets/BuildCoreSdkTasks.targets @@ -25,9 +25,7 @@ - - diff --git a/src/redist/targets/GenerateMSIs.targets b/src/redist/targets/GenerateMSIs.targets index 11f613060..2ef350c4f 100644 --- a/src/redist/targets/GenerateMSIs.targets +++ b/src/redist/targets/GenerateMSIs.targets @@ -103,25 +103,25 @@ - + - - - diff --git a/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/FileInfoAssertions.cs b/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/FileInfoAssertions.cs index 6cbba1560..dca27f0c5 100644 --- a/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/FileInfoAssertions.cs +++ b/test/Microsoft.DotNet.Tools.Tests.Utilities/Assertions/FileInfoAssertions.cs @@ -40,16 +40,5 @@ namespace Microsoft.DotNet.Tools.Test.Utilities .FailWith($"Expected File {_fileInfo.FullName} to not exist, but it does."); return new AndConstraint(this); } - - public AndWhichConstraint HaveLastWriteTimeUtc(string because = "", params object[] reasonArgs) - { - var lastWriteTimeUtc = _fileInfo.LastWriteTimeUtc; - - Execute.Assertion - .ForCondition(lastWriteTimeUtc != null) - .BecauseOf(because, reasonArgs) - .FailWith($"Expected File {_fileInfo.FullName} to have a LastWriteTimeUTC, but it is null."); - return new AndWhichConstraint(this, lastWriteTimeUtc); - } } }