From a74240f37809485c1fbbde844acf3e056a3ff41c Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Mon, 23 Oct 2023 21:14:04 -0600 Subject: [PATCH 1/5] Fix v17.2 official build --- nuget.config | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/nuget.config b/nuget.config index 40c3009ef..0a73357e8 100644 --- a/nuget.config +++ b/nuget.config @@ -2,24 +2,13 @@ - - - - - + - - - Microsoft;xunit;manuel.roemer;sharwell;jamesnk;aarnott;MarcoRossignoli;Thecentury;clairernovotny;reg;mmanela;onovotny - - - - - - - - + + + + From a5d42f8fabe6c1b548075125ce2f16e266cd5e2d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 15 Nov 2023 14:28:59 -0700 Subject: [PATCH 2/5] Fix optprof pipeline VS Eng wants us to avoid using DD-CB-PR for non-PR builds, such as optprof runs. --- azure-pipelines/OptProf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/OptProf.yml b/azure-pipelines/OptProf.yml index 3201f263f..abb2f2fb5 100644 --- a/azure-pipelines/OptProf.yml +++ b/azure-pipelines/OptProf.yml @@ -93,9 +93,9 @@ stages: SkipCreatePR: true CustomScriptExecutionCommand: src\VSSDK\NuGet\AllowUnstablePackages.ps1 - task: benjhuser.tfs-extensions-build-tasks.trigger-build-task.TriggerBuild@3 - displayName: Trigger a new build of DD-CB-PR + displayName: Trigger a new build of DD-CB-TestSignVS-devCI inputs: - buildDefinition: DD-CB-PR + buildDefinition: DD-CB-TestSignVS-devCI useSameBranch: false branchToUse: $(InsertTopicBranch) storeInEnvironmentVariable: true From eb605ed639a2a753dc562fa866565b7433debca6 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 28 Nov 2023 11:21:22 -0700 Subject: [PATCH 3/5] Insert into rel/d17.2 --- azure-pipelines/variables/InsertTargetBranch.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/variables/InsertTargetBranch.ps1 b/azure-pipelines/variables/InsertTargetBranch.ps1 index cdcc91943..49d6dadfb 100644 --- a/azure-pipelines/variables/InsertTargetBranch.ps1 +++ b/azure-pipelines/variables/InsertTargetBranch.ps1 @@ -1,2 +1,2 @@ # This is the default branch of the VS repo that we will use to insert into VS. -'main' +'rel/d17.2' From 44669275d39315b5177b6b1c5b0d6ff4a70ea613 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Wed, 29 Nov 2023 13:25:39 -0700 Subject: [PATCH 4/5] Fix v17.2 optprof's inclusion of the `VSInsertionMetadata` package --- azure-pipelines/artifacts/VSInsertion.ps1 | 37 ++++++++++++++----- .../variables/InsertConfigValues.ps1 | 7 ++-- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/azure-pipelines/artifacts/VSInsertion.ps1 b/azure-pipelines/artifacts/VSInsertion.ps1 index 0e848f3c2..b3b4661b6 100644 --- a/azure-pipelines/artifacts/VSInsertion.ps1 +++ b/azure-pipelines/artifacts/VSInsertion.ps1 @@ -1,20 +1,33 @@ # This artifact captures everything needed to insert into VS (NuGet packages, insertion metadata, etc.) +<# +.PARAMETER SbomNotRequired + Indicates that returning the artifacts available is preferable to nothing at all when the SBOM has not yet been generated. +#> +[CmdletBinding()] +Param ( + [switch]$SbomNotRequired +) + if ($IsMacOS -or $IsLinux) { # We only package up for insertions on Windows agents since they are where optprof can happen. - Write-Verbose "Skipping VSInsertion artifact since we're not on Windows" + Write-Verbose "Skipping VSInsertion artifact since we're not on Windows." return @{} } $RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") -$config = 'Debug' -if ($env:BUILDCONFIGURATION) { $config = $env:BUILDCONFIGURATION } -$NuGetPackages = "$RepoRoot\bin\Packages\$config\NuGet" -$CoreXTPackages = "$RepoRoot\bin\Packages\$config\CoreXT" -if (-not (Test-Path $NuGetPackages)) { Write-Warning "No NuGet packages found. Has a build been run?"; return @{} } +$BuildConfiguration = $env:BUILDCONFIGURATION +if (!$BuildConfiguration) { + $BuildConfiguration = 'Debug' +} -# This artifact is not ready if we're running on the devdiv AzDO account and we don't have an SBOM yet. -if ($env:SYSTEM_COLLECTIONID -eq '011b8bdf-6d56-4f87-be0d-0092136884d9' -and -not (Test-Path $NuGetPackages/_manifest)) { return @{} } +$NuGetPackages = "$RepoRoot\bin\Packages\$BuildConfiguration\NuGet" +$CoreXTPackages = "$RepoRoot\bin\Packages\$BuildConfiguration\CoreXT" + +if (!(Test-Path $NuGetPackages)) { + Write-Warning "Skipping because NuGet packages haven't been built yet." + return @{} +} $ArtifactBasePath = "$RepoRoot\obj\_artifacts" $ArtifactPath = "$ArtifactBasePath\VSInsertion" @@ -39,7 +52,13 @@ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } +# This artifact is not ready if we're running on the devdiv AzDO account and we don't have an SBOM yet. +if ($env:SYSTEM_COLLECTIONID -eq '011b8bdf-6d56-4f87-be0d-0092136884d9' -and -not (Test-Path $NuGetPackages/_manifest) -and -not $SbomNotRequired) { + Write-Host "Skipping because SBOM isn't generated yet." + return @{} +} + @{ - "$NuGetPackages" = (Get-ChildItem -Recurse $NuGetPackages); + "$NuGetPackages" = (Get-ChildItem $NuGetPackages -Recurse) "$CoreXTPackages" = (Get-ChildItem "$CoreXTPackages\Microsoft.VisualStudio.Threading.VSInsertionMetadata.$InsertionMetadataVersion.nupkg"); } diff --git a/azure-pipelines/variables/InsertConfigValues.ps1 b/azure-pipelines/variables/InsertConfigValues.ps1 index a8aafb460..1ab53f34e 100644 --- a/azure-pipelines/variables/InsertConfigValues.ps1 +++ b/azure-pipelines/variables/InsertConfigValues.ps1 @@ -1,9 +1,8 @@ -$BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..\bin\Packages\$env:BUILDCONFIGURATION") +$InsertedPkgs = (& "$PSScriptRoot\..\artifacts\VSInsertion.ps1" -SbomNotRequired) -$dirsToSearch = "$BinPath\NuGet\*.nupkg","$BinPath\CoreXT\*.nupkg" |? { Test-Path $_ } $icv=@() -if ($dirsToSearch) { - Get-ChildItem -Path $dirsToSearch |% { +foreach ($kvp in $InsertedPkgs.GetEnumerator()) { + $kvp.Value |% { if ($_.Name -match "^(.*?)\.(\d+\.\d+\.\d+(?:\.\d+)?(?:-.*?)?)(?:\.symbols)?\.nupkg$") { $id = $Matches[1] $version = $Matches[2] From c011c77aa30dde13d94ddb137e5f04e5f186debf Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 8 Dec 2023 13:49:28 -0700 Subject: [PATCH 5/5] Fix symbol archival in servicing branches --- azure-pipelines/official.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/azure-pipelines/official.yml b/azure-pipelines/official.yml index f49cf5301..25cfc6751 100644 --- a/azure-pipelines/official.yml +++ b/azure-pipelines/official.yml @@ -81,14 +81,13 @@ stages: - download: current artifact: symbols-Windows displayName: Download symbols-Windows artifact - - task: MicroBuildArchiveSymbols@1 - displayName: Archive symbols to Symweb + - task: MicroBuildArchiveSymbols@4 + displayName: 🔣 Archive symbols to Symweb inputs: SymbolsFeatureName: $(SymbolsFeatureName) - SymbolsSymwebProject: VS - SymbolsUncPath: \\cpvsbuild\drops\$(TeamName)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildId)\Symbols.Archival - SymbolsEmailContacts: vsidemicrobuild + SymbolsProject: VS SymbolsAgentPath: $(Pipeline.Workspace)/symbols-Windows + azureSubscription: Symbols Upload (DevDiv) - task: MicroBuildCleanup@1 displayName: Send Telemetry