From 665bf21fcb80476e399712b9b47a891808a2e32f Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 9 Nov 2022 14:51:24 -0800 Subject: [PATCH] Bump to use internal .NET 7 GA build (#18508) --- .vsts-ci/templates/verify-xunit.yml | 4 ++-- DotnetRuntimeMetadata.json | 6 +++--- assets/wix/files.wxs | 8 ++++---- build.psm1 | 8 +++++--- global.json | 2 +- ...icrosoft.PowerShell.Commands.Management.csproj | 2 +- .../Microsoft.PowerShell.Commands.Utility.csproj | 9 +++++---- .../Microsoft.PowerShell.CoreCLR.Eventing.csproj | 2 +- .../Microsoft.PowerShell.SDK.csproj | 15 ++++++++++----- .../Microsoft.WSMan.Management.csproj | 2 +- .../System.Management.Automation.csproj | 15 ++++++++------- test/tools/TestService/TestService.csproj | 2 +- test/tools/WebListener/WebListener.csproj | 4 ++-- .../azureDevOps/templates/compliance/apiscan.yml | 4 ++++ .../templates/linux-authenticode-sign.yml | 2 +- .../azureDevOps/templates/linux-packaging.yml | 4 ++++ .../releaseBuild/azureDevOps/templates/linux.yml | 4 ++++ .../azureDevOps/templates/mac-package-build.yml | 7 +++++++ tools/releaseBuild/azureDevOps/templates/mac.yml | 7 +++++++ .../releaseBuild/azureDevOps/templates/nuget.yml | 4 ++++ .../templates/release-GlobalToolTest.yml | 12 ++++++++++++ .../azureDevOps/templates/release-SDKTests.yml | 7 +++++++ .../azureDevOps/templates/testartifacts.yml | 4 ++++ .../templates/windows-hosted-build.yml | 4 ++++ .../azureDevOps/templates/windows-packaging.yml | 4 ++++ 25 files changed, 106 insertions(+), 36 deletions(-) diff --git a/.vsts-ci/templates/verify-xunit.yml b/.vsts-ci/templates/verify-xunit.yml index d2799f53ae..b43cb9339f 100644 --- a/.vsts-ci/templates/verify-xunit.yml +++ b/.vsts-ci/templates/verify-xunit.yml @@ -19,12 +19,12 @@ jobs: xunit/**/* downloadPath: '$(System.ArtifactsDirectory)' - - powershell: | + - pwsh: | dir "$(System.ArtifactsDirectory)\*" -Recurse displayName: 'Capture artifacts directory' continueOnError: true - - powershell: | + - pwsh: | Import-Module .\tools\ci.psm1 $xUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\xUnitTestResults.xml" diff --git a/DotnetRuntimeMetadata.json b/DotnetRuntimeMetadata.json index 2f4b4442ef..3e84f733c4 100644 --- a/DotnetRuntimeMetadata.json +++ b/DotnetRuntimeMetadata.json @@ -1,13 +1,13 @@ { "sdk": { - "channel": "7.0.1xx-rc2", + "channel": "7.0.1xx", "quality": "daily", "qualityFallback": "preview", - "packageVersionPattern": "7.0.0-rc.2", + "packageVersionPattern": "7.0.0", "sdkImageVersion": "7.0.100", "nextChannel": "7.0.1xx-rc2", "azureFeed": "", - "sdkImageOverride": "" + "sdkImageOverride": "7.0.100-rtm.22521.12" }, "internalfeed": { "url": "" diff --git a/assets/wix/files.wxs b/assets/wix/files.wxs index 47501d9303..408ad21805 100644 --- a/assets/wix/files.wxs +++ b/assets/wix/files.wxs @@ -2775,12 +2775,12 @@ - - - + + + @@ -3667,9 +3667,9 @@ - + diff --git a/build.psm1 b/build.psm1 index ca1a87c41e..01d8b4ded7 100644 --- a/build.psm1 +++ b/build.psm1 @@ -19,7 +19,8 @@ $script:Options = $null $dotnetMetadata = Get-Content $PSScriptRoot/DotnetRuntimeMetadata.json | ConvertFrom-Json $dotnetCLIChannel = $dotnetMetadata.Sdk.Channel $dotnetCLIQuality = $dotnetMetadata.Sdk.Quality -$dotnetAzureFeed = $dotnetMetadata.Sdk.azureFeed +$dotnetAzureFeed = $env:__DONET_RUNTIME_FEED ?? $dotnetMetadata.Sdk.azureFeed +$dotnetAzureFeedSecret = $env:__DONET_RUNTIME_FEED_KEY $dotnetSDKVersionOveride = $dotnetMetadata.Sdk.sdkImageOverride $dotnetCLIRequiredVersion = $(Get-Content $PSScriptRoot/global.json | ConvertFrom-Json).Sdk.Version @@ -1969,7 +1970,8 @@ function Install-Dotnet { $psArgs += @('-SkipNonVersionedFiles') - $psArgs -join ' ' | Write-Verbose -Verbose + # Removing the verbose message to not expose the secret + # $psArgs -join ' ' | Write-Verbose -Verbose Start-NativeExecution { & $fullPSPath @psArgs @@ -2189,7 +2191,7 @@ function Start-PSBootstrap { if ($dotnetAzureFeed) { $null = $DotnetArguments.Add("AzureFeed", $dotnetAzureFeed) - $null = $DotnetArguments.Add("FeedCredential", $null) + $null = $DotnetArguments.Add("FeedCredential", $dotnetAzureFeedSecret) } Install-Dotnet @DotnetArguments diff --git a/global.json b/global.json index 76bca39fb4..70e3dcc508 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "7.0.100-rc.2.22477.23" + "version": "7.0.100" } } diff --git a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj index 414c338a2c..06bd7872cb 100644 --- a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj +++ b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj @@ -47,7 +47,7 @@ - + diff --git a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj index d502b7048e..ad1269ae24 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj +++ b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj @@ -8,6 +8,7 @@ + @@ -31,10 +32,10 @@ - - - - + + + + diff --git a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj index c33fc10ccd..26376c5609 100644 --- a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj +++ b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj index 4159ee8e56..bd26318a6b 100644 --- a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj +++ b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj @@ -15,12 +15,17 @@ + + + + + - + - - - + + + @@ -29,7 +34,7 @@ - + diff --git a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj index 3b45803af9..94a1351534 100644 --- a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj +++ b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj index 9cde2d2494..53204b1de7 100644 --- a/src/System.Management.Automation/System.Management.Automation.csproj +++ b/src/System.Management.Automation/System.Management.Automation.csproj @@ -34,16 +34,17 @@ - - - + + + + - + - - - + + + diff --git a/test/tools/TestService/TestService.csproj b/test/tools/TestService/TestService.csproj index aeb87b00ad..2ab58a57dd 100644 --- a/test/tools/TestService/TestService.csproj +++ b/test/tools/TestService/TestService.csproj @@ -13,7 +13,7 @@ - + diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj index a80dcd0d97..3977af31fb 100644 --- a/test/tools/WebListener/WebListener.csproj +++ b/test/tools/WebListener/WebListener.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/tools/releaseBuild/azureDevOps/templates/compliance/apiscan.yml b/tools/releaseBuild/azureDevOps/templates/compliance/apiscan.yml index aa81407e3e..cae5e0e023 100644 --- a/tools/releaseBuild/azureDevOps/templates/compliance/apiscan.yml +++ b/tools/releaseBuild/azureDevOps/templates/compliance/apiscan.yml @@ -16,6 +16,7 @@ jobs: value: $[format('{0:yyyyMMdd}-{1}', pipeline.startTime,variables['Build.SourceBranch'])] - name: branchCounter value: $[counter(variables['branchCounterKey'], 1)] + - group: DotNetPrivateBuildAccess pool: name: PowerShell1ES @@ -38,6 +39,9 @@ jobs: workingDirectory: '$(Build.SourcesDirectory)' retryCountOnTaskFailure: 2 displayName: 'Bootstrap' + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | Import-Module .\build.psm1 -force diff --git a/tools/releaseBuild/azureDevOps/templates/linux-authenticode-sign.yml b/tools/releaseBuild/azureDevOps/templates/linux-authenticode-sign.yml index d014cf7432..39eeb7dd5f 100644 --- a/tools/releaseBuild/azureDevOps/templates/linux-authenticode-sign.yml +++ b/tools/releaseBuild/azureDevOps/templates/linux-authenticode-sign.yml @@ -70,7 +70,7 @@ jobs: parameters: repoRoot: $(PowerShellRoot) - - powershell: | + - pwsh: | Set-Location $env:POWERSHELLROOT import-module "$env:POWERSHELLROOT/build.psm1" Sync-PSTags -AddRemoteIfMissing diff --git a/tools/releaseBuild/azureDevOps/templates/linux-packaging.yml b/tools/releaseBuild/azureDevOps/templates/linux-packaging.yml index f5e298f713..f75ca3971a 100644 --- a/tools/releaseBuild/azureDevOps/templates/linux-packaging.yml +++ b/tools/releaseBuild/azureDevOps/templates/linux-packaging.yml @@ -20,6 +20,7 @@ jobs: - name: NugetSecurityAnalysisWarningLevel value: none - group: ESRP + - group: DotNetPrivateBuildAccess steps: - ${{ if or(eq(variables.build,'deb'), eq(variables.build,'rpm')) }} : @@ -162,6 +163,9 @@ jobs: displayName: 'Bootstrap' condition: and(succeeded(), ne(variables['SkipBuild'], 'true')) workingDirectory: $(PowerShellRoot) + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - powershell: | try { diff --git a/tools/releaseBuild/azureDevOps/templates/linux.yml b/tools/releaseBuild/azureDevOps/templates/linux.yml index e7caa41bc3..ab551a16dd 100644 --- a/tools/releaseBuild/azureDevOps/templates/linux.yml +++ b/tools/releaseBuild/azureDevOps/templates/linux.yml @@ -20,6 +20,7 @@ jobs: - name: NugetSecurityAnalysisWarningLevel value: none - group: ESRP + - group: DotNetPrivateBuildAccess steps: - checkout: self @@ -60,6 +61,9 @@ jobs: displayName: 'Bootstrap' condition: and(succeeded(), ne(variables['SkipBuild'], 'true')) workingDirectory: $(PowerShellRoot) + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | try { diff --git a/tools/releaseBuild/azureDevOps/templates/mac-package-build.yml b/tools/releaseBuild/azureDevOps/templates/mac-package-build.yml index e61ea99004..0f5b9acbc1 100644 --- a/tools/releaseBuild/azureDevOps/templates/mac-package-build.yml +++ b/tools/releaseBuild/azureDevOps/templates/mac-package-build.yml @@ -17,6 +17,7 @@ jobs: value: false - name: NugetSecurityAnalysisWarningLevel value: none + - group: DotNetPrivateBuildAccess steps: - checkout: self clean: true @@ -116,6 +117,9 @@ jobs: throw } displayName: 'Bootstrap VM' + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | # Add -SkipReleaseChecks as a mitigation to unblock release. @@ -127,6 +131,9 @@ jobs: throw } displayName: 'Package' + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Detection' diff --git a/tools/releaseBuild/azureDevOps/templates/mac.yml b/tools/releaseBuild/azureDevOps/templates/mac.yml index 776382c952..7bf1a2121d 100644 --- a/tools/releaseBuild/azureDevOps/templates/mac.yml +++ b/tools/releaseBuild/azureDevOps/templates/mac.yml @@ -15,6 +15,7 @@ jobs: value: false - name: NugetSecurityAnalysisWarningLevel value: none + - group: DotNetPrivateBuildAccess steps: #- task: @ # inputs: @@ -41,6 +42,9 @@ jobs: - pwsh: | tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -location $(PowerShellRoot) -BootStrap displayName: 'Bootstrap VM' + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - template: /tools/releaseBuild/azureDevOps/templates/insert-nuget-config-azfeed.yml parameters: @@ -53,6 +57,9 @@ jobs: $(Build.SourcesDirectory)/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -ReleaseTag $(ReleaseTagVar) -Destination $(System.ArtifactsDirectory) -Symbols -location $(PowerShellRoot) -Build -ArtifactName macosBinResults -Runtime 'osx-${{ parameters.buildArchitecture }}' -SkipReleaseChecks $env:AzDevOpsFeedPAT2 = $null displayName: 'Build' + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Detection' diff --git a/tools/releaseBuild/azureDevOps/templates/nuget.yml b/tools/releaseBuild/azureDevOps/templates/nuget.yml index f514ca7741..f38e1a718c 100644 --- a/tools/releaseBuild/azureDevOps/templates/nuget.yml +++ b/tools/releaseBuild/azureDevOps/templates/nuget.yml @@ -32,6 +32,7 @@ jobs: value: '$(System.ArtifactsDirectory)/winFxdWinDesktop' - name: linuxFxdPath value: '$(System.ArtifactsDirectory)/linuxFxd' + - group: DotNetPrivateBuildAccess steps: - checkout: self @@ -56,6 +57,9 @@ jobs: # We just need .NET but we fixed this in an urgent situation. Start-PSBootStrap -Verbose displayName: Bootstrap + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - task: DownloadBuildArtifacts@0 displayName: 'Download PowerShell build artifacts - finalResults' diff --git a/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml b/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml index 8ac318db92..bd353baaec 100644 --- a/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml +++ b/tools/releaseBuild/azureDevOps/templates/release-GlobalToolTest.yml @@ -12,6 +12,9 @@ jobs: pool: # test vmImage: ${{ parameters.imageName }} + variables: + - group: DotNetPrivateBuildAccess + steps: - checkout: self clean: true @@ -57,6 +60,9 @@ jobs: Write-Verbose -Message "Installing .NET SDK completed." -Verbose displayName: Install .NET + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | $branch = $ENV:BUILD_SOURCEBRANCH @@ -78,6 +84,9 @@ jobs: Get-ChildItem -Path $toolPath displayName: Install global tool + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | $toolPath = "$(System.DefaultWorkingDirectory)/toolPath/${{ parameters.globalToolExeName }}" @@ -138,3 +147,6 @@ jobs: write-verbose -verbose "Got expected year: $dateYear" } displayName: Basic validation + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) diff --git a/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml b/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml index b417df7da0..0efffbee99 100644 --- a/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml +++ b/tools/releaseBuild/azureDevOps/templates/release-SDKTests.yml @@ -11,6 +11,7 @@ jobs: vmImage: ${{ parameters.imageName }} variables: - group: AzDevOpsArtifacts + - group: DotNetPrivateBuildAccess steps: - checkout: self clean: true @@ -95,6 +96,9 @@ jobs: Write-Verbose -Message "Installing .NET SDK completed." -Verbose displayName: Install .NET + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 @@ -131,6 +135,9 @@ jobs: dotnet test /property:RELEASE_VERSION=$releaseVersion --test-adapter-path:. "--logger:xunit;LogFilePath=$(System.DefaultWorkingDirectory)/test-hosting.xml" displayName: Restore and execute tests + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - task: PublishTestResults@2 displayName: 'Publish Test Results **\test-hosting.xml' diff --git a/tools/releaseBuild/azureDevOps/templates/testartifacts.yml b/tools/releaseBuild/azureDevOps/templates/testartifacts.yml index 0eec5cd25a..b76ec0514b 100644 --- a/tools/releaseBuild/azureDevOps/templates/testartifacts.yml +++ b/tools/releaseBuild/azureDevOps/templates/testartifacts.yml @@ -5,6 +5,7 @@ jobs: value: false - name: NugetSecurityAnalysisWarningLevel value: none + - group: DotNetPrivateBuildAccess displayName: Build test artifacts condition: succeeded() pool: @@ -22,6 +23,9 @@ jobs: Import-Module ./build.psm1 Start-PSBootstrap displayName: Bootstrap + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | Import-Module ./build.psm1 diff --git a/tools/releaseBuild/azureDevOps/templates/windows-hosted-build.yml b/tools/releaseBuild/azureDevOps/templates/windows-hosted-build.yml index 1201edf98b..fd04f5ba5f 100644 --- a/tools/releaseBuild/azureDevOps/templates/windows-hosted-build.yml +++ b/tools/releaseBuild/azureDevOps/templates/windows-hosted-build.yml @@ -30,6 +30,7 @@ jobs: value: ${{ parameters.Architecture }} - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE value: 1 + - group: DotNetPrivateBuildAccess steps: @@ -65,6 +66,9 @@ jobs: tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 -location '$(PowerShellRoot)' -destination '$(Build.ArtifactStagingDirectory)/Symbols_$(Architecture)' -Runtime $runtime -ReleaseTag '$(ReleaseTagVar)' -Symbols @params displayName: 'Build Windows Universal - $(Architecture)-$(BuildConfiguration) Symbols zip' + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | $packageName = (Get-ChildItem '$(Build.ArtifactStagingDirectory)\Symbols_$(Architecture)').FullName diff --git a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml index befcebf3bd..0b9ff979ef 100644 --- a/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml +++ b/tools/releaseBuild/azureDevOps/templates/windows-packaging.yml @@ -27,6 +27,7 @@ jobs: - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE value: 1 - group: ESRP + - group: DotNetPrivateBuildAccess steps: @@ -257,6 +258,9 @@ jobs: $(PowerShellRoot)/tools/releaseBuild/Images/microsoft_powershell_windowsservercore/PowerShellPackage.ps1 -BuildZip $signedPkg -location '$(PowerShellRoot)' -destination '$(System.ArtifactsDirectory)\pkgSigned' -Runtime $runtime -ReleaseTag '$(ReleaseTagVar)' @params displayName: 'Build Windows Universal - $(Architecture) Package' + env: + __DONET_RUNTIME_FEED: $(RUNTIME_SOURCEFEED) + __DONET_RUNTIME_FEED_KEY: $(RUNTIME_SOURCEFEED_KEY) - pwsh: | Get-ChildItem '$(System.ArtifactsDirectory)\pkgSigned' | ForEach-Object {