diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 859d3f470..9f9de05c4 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "powershell": { - "version": "7.5.3", + "version": "7.5.4", "commands": [ "pwsh" ], @@ -17,14 +17,14 @@ "rollForward": false }, "nbgv": { - "version": "3.8.118", + "version": "3.9.50", "commands": [ "nbgv" ], "rollForward": false }, "docfx": { - "version": "2.78.3", + "version": "2.78.4", "commands": [ "docfx" ], diff --git a/.github/actions/publish-artifacts/action.yaml b/.github/actions/publish-artifacts/action.yaml index 1f345fe6f..3b267f3e7 100644 --- a/.github/actions/publish-artifacts/action.yaml +++ b/.github/actions/publish-artifacts/action.yaml @@ -14,46 +14,46 @@ runs: - name: 📢 Upload project.assets.json files if: always() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: projectAssetsJson-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/projectAssetsJson continue-on-error: true - name: 📢 Upload variables - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: variables-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/Variables continue-on-error: true - name: 📢 Upload build_logs if: always() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: build_logs-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/build_logs continue-on-error: true - name: 📢 Upload testResults if: always() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: testResults-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/testResults continue-on-error: true - name: 📢 Upload coverageResults if: always() - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: coverageResults-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/coverageResults continue-on-error: true - name: 📢 Upload symbols - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: symbols-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/symbols continue-on-error: true - name: 📢 Upload deployables - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: deployables-${{ runner.os }} path: ${{ runner.temp }}/_artifacts/deployables diff --git a/.github/workflows/docs_validate.yml b/.github/workflows/docs_validate.yml index 8fac4d10e..d2f4690d0 100644 --- a/.github/workflows/docs_validate.yml +++ b/.github/workflows/docs_validate.yml @@ -27,4 +27,3 @@ jobs: shell: pwsh - name: 📚 Verify docfx build run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures - if: runner.os == 'Linux' diff --git a/Directory.Build.props b/Directory.Build.props index b0b65b693..62f74ed37 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,6 +15,7 @@ true true true + true true @@ -40,7 +41,7 @@ - 13 + 14 16.9 diff --git a/Directory.Packages.props b/Directory.Packages.props index e6915d28b..d100accc5 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,7 +4,7 @@ true true - 2.0.201 + 2.0.208 3.11.0 4.13.0 1.1.2 @@ -48,7 +48,7 @@ - + @@ -61,7 +61,7 @@ - + diff --git a/azure-pipelines/OptProf.yml b/azure-pipelines/OptProf.yml index 4de0ee405..67f3edced 100644 --- a/azure-pipelines/OptProf.yml +++ b/azure-pipelines/OptProf.yml @@ -97,6 +97,10 @@ stages: TeamEmail: $(TeamEmail) SkipCreatePR: true CustomScriptExecutionCommand: src\VSSDK\NuGet\AllowUnstablePackages.ps1 + ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: + ConnectedVSDropServiceName: 'VSEng-VSDrop-MI' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - task: benjhuser.tfs-extensions-build-tasks.trigger-build-task.TriggerBuild@3 displayName: Trigger a new build of DD-CB-TestSignVS-devCI inputs: diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index bc7cf3afd..cc88bb2a5 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -29,14 +29,17 @@ parameters: - name: artifact_names type: object default: - - build_logs - - coverageResults - - deployables - - projectAssetsJson - - symbols - - testResults - - test_symbols - - Variables + - name: build_logs + - name: coverageResults + - name: deployables + sbomEnabled: true + - name: projectAssetsJson + - name: symbols + - name: testResults + testOnly: true + - name: test_symbols + testOnly: true + - name: Variables # The Enable*Build parameters turn non-Windows agents on or off. # Their default value should be based on whether the build and tests are expected/required to pass on that platform. # Callers (e.g. Official.yml) *may* expose these parameters at queue-time in order to turn OFF optional agents. @@ -57,6 +60,11 @@ parameters: - name: Is1ESPT type: boolean +# Indicates whether the 'official' 1ES PT templates are being used (as opposed to the unofficial ones). +- name: Is1ESPTOfficial + type: boolean + default: false + - name: RealSign type: boolean default: false @@ -148,13 +156,21 @@ jobs: outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - - ${{ each artifact_name in parameters.artifact_names }}: - - ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }}: + - ${{ each artifact in parameters.artifact_names }}: + - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}: - output: pipelineArtifact - displayName: 📢 Publish ${{ artifact_name }}-Windows - targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-Windows - artifactName: ${{ artifact_name }}-Windows - condition: succeededOrFailed() + displayName: 📢 Publish ${{ artifact.name }}-Windows + targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Windows + artifactName: ${{ artifact.name }}-Windows + ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: + sbomEnabled: true + - output: pipelineArtifact + displayName: 📢 Publish ${{ artifact.name }}-Windows (for failed attempts) + targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Windows + artifactName: ${{ artifact.name }}-Windows-$(System.PhaseAttempt) + ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: + sbomEnabled: true + condition: failed() - output: pipelineArtifact displayName: 📢 Publish VSInsertion-Windows targetPath: $(Build.ArtifactStagingDirectory)/VSInsertion-Windows @@ -191,7 +207,6 @@ jobs: - template: microbuild.before.yml parameters: EnableLocalization: ${{ parameters.EnableLocalization }} - EnableOptProf: ${{ parameters.EnableOptProf }} IsOptProf: ${{ parameters.IsOptProf }} ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} RealSign: ${{ parameters.RealSign }} @@ -212,7 +227,6 @@ jobs: - ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: - template: microbuild.after.yml parameters: - EnableOptProf: ${{ parameters.EnableOptProf }} IsOptProf: ${{ parameters.IsOptProf }} SkipCodesignVerify: ${{ parameters.SkipCodesignVerify }} @@ -230,13 +244,21 @@ jobs: signWithProd: true outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - - ${{ each artifact_name in parameters.artifact_names }}: - - ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }}: + - ${{ each artifact in parameters.artifact_names }}: + - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}: + - output: pipelineArtifact + displayName: 📢 Publish ${{ artifact.name }}-Linux + targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux + artifactName: ${{ artifact.name }}-Linux + ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: + sbomEnabled: true - output: pipelineArtifact - displayName: 📢 Publish ${{ artifact_name }}-Linux - targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-Linux - artifactName: ${{ artifact_name }}-Linux - condition: succeededOrFailed() + displayName: 📢 Publish ${{ artifact.name }}-Linux (for failed attempts) + targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-Linux + artifactName: ${{ artifact.name }}-Linux-$(System.PhaseAttempt) + ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: + sbomEnabled: true + condition: failed() steps: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. @@ -267,13 +289,21 @@ jobs: signWithProd: true outputParentDirectory: $(Build.ArtifactStagingDirectory) outputs: - - ${{ each artifact_name in parameters.artifact_names }}: - - ${{ if or(ne(artifact_name, 'testResults'), parameters.RunTests) }}: + - ${{ each artifact in parameters.artifact_names }}: + - ${{ if or(ne(artifact.testOnly, 'true'), parameters.RunTests) }}: + - output: pipelineArtifact + displayName: 📢 Publish ${{ artifact.name }}-macOS + targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS + artifactName: ${{ artifact.name }}-macOS + ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: + sbomEnabled: true - output: pipelineArtifact - displayName: 📢 Publish ${{ artifact_name }}-macOS - targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact_name }}-macOS - artifactName: ${{ artifact_name }}-macOS - condition: succeededOrFailed() + displayName: 📢 Publish ${{ artifact.name }}-macOS (for failed attempts) + targetPath: $(Build.ArtifactStagingDirectory)/${{ artifact.name }}-macOS + artifactName: ${{ artifact.name }}-macOS-$(System.PhaseAttempt) + ${{ if and(parameters.Is1ESPTOfficial, eq(artifact.sbomEnabled, 'true')) }}: + sbomEnabled: true + condition: failed() steps: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. diff --git a/azure-pipelines/microbuild.after.yml b/azure-pipelines/microbuild.after.yml index 025de4f5f..67ba90080 100644 --- a/azure-pipelines/microbuild.after.yml +++ b/azure-pipelines/microbuild.after.yml @@ -1,7 +1,4 @@ parameters: -- name: EnableOptProf - type: boolean - default: false - name: IsOptProf type: boolean default: false diff --git a/azure-pipelines/microbuild.before.yml b/azure-pipelines/microbuild.before.yml index d09310b1e..fd47d1bb9 100644 --- a/azure-pipelines/microbuild.before.yml +++ b/azure-pipelines/microbuild.before.yml @@ -2,9 +2,6 @@ parameters: - name: EnableLocalization type: boolean default: false -- name: EnableOptProf - type: boolean - default: false - name: IsOptProf type: boolean default: false @@ -26,7 +23,7 @@ steps: inputs: outputfile: $(System.DefaultWorkingDirectory)/obj/NOTICE outputformat: text - retryCountOnTaskFailure: 3 # fails when the cloud service is overloaded + retryCountOnTaskFailure: 10 # fails when the cloud service is overloaded continueOnError: ${{ not(parameters.RealSign) }} # Tolerate failures when we're not building something that may ship. - ${{ if parameters.IsOptProf }}: diff --git a/azure-pipelines/official.yml b/azure-pipelines/official.yml index f6278b1e2..660681c39 100644 --- a/azure-pipelines/official.yml +++ b/azure-pipelines/official.yml @@ -68,6 +68,7 @@ extends: - template: /azure-pipelines/build.yml@self parameters: Is1ESPT: true + Is1ESPTOfficial: true RealSign: true ShouldSkipOptimize: ${{ parameters.ShouldSkipOptimize }} EnableAPIScan: ${{ parameters.EnableAPIScan }} diff --git a/azure-pipelines/release.yml b/azure-pipelines/release.yml index 95832ea61..915908a1a 100644 --- a/azure-pipelines/release.yml +++ b/azure-pipelines/release.yml @@ -28,7 +28,8 @@ extends: stages: - stage: release jobs: - - job: release + - job: nuget + displayName: 📦 Push nuget.org packages pool: name: AzurePipelines-EO demands: @@ -45,6 +46,28 @@ extends: publishFeedCredentials: VisualStudioExtensibility (nuget.org) steps: - checkout: none + - download: CI + artifact: deployables-Windows + displayName: 🔻 Download deployables-Windows artifact + patterns: 'NuGet/*' + - job: github + displayName: 📢 GitHub release + dependsOn: nuget + pool: + name: AzurePipelines-EO + demands: + - ImageOverride -equals 1ESPT-Ubuntu22.04 + os: Linux + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + pipeline: CI + artifactName: deployables-Windows + targetPath: $(Pipeline.Workspace)/CI/deployables-Windows + steps: + - checkout: none - powershell: | Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)" if ('$(resources.pipeline.CI.runName)'.Contains('-')) { @@ -53,10 +76,6 @@ extends: Write-Host "##vso[task.setvariable variable=IsPrerelease]false" } displayName: ⚙ Set up pipeline - - download: CI - artifact: deployables-Windows - displayName: 🔻 Download deployables-Windows artifact - patterns: 'NuGet/*' - task: GitHubRelease@1 displayName: 📢 GitHub release (create) inputs: diff --git a/azure-pipelines/vs-insertion.yml b/azure-pipelines/vs-insertion.yml index d8b0035cb..1913a38e3 100644 --- a/azure-pipelines/vs-insertion.yml +++ b/azure-pipelines/vs-insertion.yml @@ -69,6 +69,11 @@ extends: AutoCompletePR: true AutoCompleteMergeStrategy: Squash ShallowClone: true + ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: + ConnectedVSDropServiceName: 'VSEng-VSDrop-MI' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + - powershell: | $contentType = 'application/json'; $headers = @{ Authorization = 'Bearer $(System.AccessToken)' }; diff --git a/azure-pipelines/vs-validation.yml b/azure-pipelines/vs-validation.yml index b6c79abaf..bd6a0aaf5 100644 --- a/azure-pipelines/vs-validation.yml +++ b/azure-pipelines/vs-validation.yml @@ -111,6 +111,10 @@ extends: DraftPR: false # set to true and update InsertionBuildPolicy when we can specify all the validations we want to run (https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2224288) AutoCompletePR: false ShallowClone: true + ${{ if eq(variables['system.collectionId'], '011b8bdf-6d56-4f87-be0d-0092136884d9') }}: + ConnectedVSDropServiceName: 'VSEng-VSDrop-MI' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) - powershell: | $insertionPRId = azure-pipelines/Get-InsertionPRId.ps1 $Markdown = @" diff --git a/global.json b/global.json index 965138470..a04d4cd45 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.306", + "version": "10.0.100", "rollForward": "patch", "allowPrerelease": false }, diff --git a/tools/Get-3rdPartySymbolFiles.ps1 b/tools/Get-ExternalSymbolFiles.ps1 similarity index 93% rename from tools/Get-3rdPartySymbolFiles.ps1 rename to tools/Get-ExternalSymbolFiles.ps1 index ef6bbef28..5ad2a1960 100644 --- a/tools/Get-3rdPartySymbolFiles.ps1 +++ b/tools/Get-ExternalSymbolFiles.ps1 @@ -79,11 +79,13 @@ Function Get-PackageVersion($id) { $version } -# All 3rd party packages for which symbols packages are expected should be listed here. +# All 1st party packages for which symbols packages are expected should be listed here. # These must all be sourced from nuget.org, as it is the only feed that supports symbol packages. -$3rdPartyPackageIds = @() +# We should NOT add 3rd party packages to this list because PDBs may be unsafe for our debuggers to load, +# so we should only archive 1st party symbols. +$1stPartyPackageIds = @() -$3rdPartyPackageIds | % { +$1stPartyPackageIds | % { $version = Get-PackageVersion $_ if ($version) { Get-SymbolsFromPackage -id $_ -version $version diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 402b4307c..3d13e817d 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -197,7 +197,7 @@ if ($InstallLocality -eq 'machine') { $restartRequired = $false $sdks |% { if ($_.Version) { $version = $_.Version } else { $version = $_.Channel } - if ($PSCmdlet.ShouldProcess(".NET SDK $_", "Install")) { + if ($PSCmdlet.ShouldProcess(".NET SDK $version ($arch)", "Install")) { Install-DotNet -Version $version -Architecture $arch $restartRequired = $restartRequired -or ($LASTEXITCODE -eq 3010) @@ -281,10 +281,10 @@ if ($IncludeX86) { } if ($IsMacOS -or $IsLinux) { - $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/0b09de9bc136cacb5f849a6957ebd4062173c148/src/dotnet-install.sh" + $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/a3fbd0fd625032bac207f1f590e5353fe26faa59/src/dotnet-install.sh" $DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.sh" } else { - $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/0b09de9bc136cacb5f849a6957ebd4062173c148/src/dotnet-install.ps1" + $DownloadUri = "https://raw.githubusercontent.com/dotnet/install-scripts/a3fbd0fd625032bac207f1f590e5353fe26faa59/src/dotnet-install.ps1" $DotNetInstallScriptPath = "$DotNetInstallScriptRoot/dotnet-install.ps1" } @@ -306,7 +306,7 @@ $global:LASTEXITCODE = 0 $sdks |% { if ($_.Version) { $parameters = '-Version', $_.Version } else { $parameters = '-Channel', $_.Channel } - if ($PSCmdlet.ShouldProcess(".NET SDK $_", "Install")) { + if ($PSCmdlet.ShouldProcess(".NET SDK $_ ($arch)", "Install")) { $anythingInstalled = $true Invoke-Expression -Command "$DotNetInstallScriptPathExpression $parameters -Architecture $arch -InstallDir $DotNetInstallDir $switches" diff --git a/tools/artifacts/Variables.ps1 b/tools/artifacts/Variables.ps1 index 7a320c7ea..c4d976650 100644 --- a/tools/artifacts/Variables.ps1 +++ b/tools/artifacts/Variables.ps1 @@ -26,7 +26,7 @@ Get-ChildItem "$PSScriptRoot/../variables" |% { if ($value) { # We got something, so wrap it with quotes so it's treated like a literal value. - $value = "'$value'" + $value = "'" + $value.Replace("'", "''") + "'" } } diff --git a/tools/artifacts/symbols.ps1 b/tools/artifacts/symbols.ps1 index b5882678a..91f83f0d4 100644 --- a/tools/artifacts/symbols.ps1 +++ b/tools/artifacts/symbols.ps1 @@ -1,10 +1,10 @@ $BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../../bin") -$3rdPartyPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../../obj/SymbolsPackages") +$ExternalPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../../obj/SymbolsPackages") if (!(Test-Path $BinPath)) { return } $symbolfiles = & "$PSScriptRoot/../Get-SymbolFiles.ps1" -Path $BinPath | Get-Unique -$3rdPartyFiles = & "$PSScriptRoot/../Get-3rdPartySymbolFiles.ps1" +$ExternalFiles = & "$PSScriptRoot/../Get-ExternalSymbolFiles.ps1" @{ "$BinPath" = $SymbolFiles; - "$3rdPartyPath" = $3rdPartyFiles; + "$ExternalPath" = $ExternalFiles; }