diff --git a/eng/pipelines/official.yml b/eng/pipelines/official.yml index 5643579fd18..33bec3f73ce 100644 --- a/eng/pipelines/official.yml +++ b/eng/pipelines/official.yml @@ -123,7 +123,7 @@ parameters: - name: CreateVSGreenInsertion displayName: Create vs-green Insertion PR type: boolean - default: false + default: true - name: InsertionVSGreenBranch displayName: vs-green Insertion Branch Name type: string @@ -171,107 +171,107 @@ stages: jobs: - template: templates/build-official-release.yml -- stage: Publish - displayName: Publish - dependsOn: Build - variables: - # https://devdiv.visualstudio.com/DevDiv/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=434&path=DotNet-Project-System - # Variables used: - # - SymbolsUncPath - - group: DotNet-Project-System - jobs: - - template: templates/publish-assets-and-packages.yml - - template: templates/publish-symbols.yml - # Disabling RichNav due to an acquisition issue. See: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1659507 - # - template: templates/publish-richnav.yml +# - stage: Publish +# displayName: Publish +# dependsOn: Build +# variables: +# # https://devdiv.visualstudio.com/DevDiv/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=434&path=DotNet-Project-System +# # Variables used: +# # - SymbolsUncPath +# - group: DotNet-Project-System +# jobs: +# - template: templates/publish-assets-and-packages.yml +# - template: templates/publish-symbols.yml +# # Disabling RichNav due to an acquisition issue. See: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1659507 +# # - template: templates/publish-richnav.yml -# Skip this stage only when specifically requested (via SkipCompliance). -- ${{ if eq(parameters.SkipCompliance, false) }}: - - stage: Compliance - displayName: Compliance - dependsOn: Build - variables: - - name: UploadTSAResults - value: ${{ parameters.UploadTSAResults }} - - name: SoftwareVersion - value: $[ stageDependencies.Build.BuildOfficialRelease.outputs['SetPackageVersion.PackageVersion'] ] - # https://devdiv.visualstudio.com/DevDiv/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=434&path=DotNet-Project-System - # Variables used: - # - ApiScanConnectionString - - group: DotNet-Project-System - jobs: - - template: templates/analyze-compliance.yml - - template: templates/analyze-api.yml +# # Skip this stage only when specifically requested (via SkipCompliance). +# - ${{ if eq(parameters.SkipCompliance, false) }}: +# - stage: Compliance +# displayName: Compliance +# dependsOn: Build +# variables: +# - name: UploadTSAResults +# value: ${{ parameters.UploadTSAResults }} +# - name: SoftwareVersion +# value: $[ stageDependencies.Build.BuildOfficialRelease.outputs['SetPackageVersion.PackageVersion'] ] +# # https://devdiv.visualstudio.com/DevDiv/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=434&path=DotNet-Project-System +# # Variables used: +# # - ApiScanConnectionString +# - group: DotNet-Project-System +# jobs: +# - template: templates/analyze-compliance.yml +# - template: templates/analyze-api.yml -- stage: Localization - displayName: Localization - # [] clears the dependency on the previous stages allowing parallelism. - dependsOn: [] - variables: - # Variable group containing the PATs required for running OneLocBuild. - # See: https://devdiv.visualstudio.com/DevDiv/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=343&path=OneLocBuildVariables - # Variables used: - # - BotAccount-dotnet-bot-repo-PAT - # - dn-bot-ceapex-package-r - - group: OneLocBuildVariables - jobs: - - template: templates/generate-localization.yml +# - stage: Localization +# displayName: Localization +# # [] clears the dependency on the previous stages allowing parallelism. +# dependsOn: [] +# variables: +# # Variable group containing the PATs required for running OneLocBuild. +# # See: https://devdiv.visualstudio.com/DevDiv/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=343&path=OneLocBuildVariables +# # Variables used: +# # - BotAccount-dotnet-bot-repo-PAT +# # - dn-bot-ceapex-package-r +# - group: OneLocBuildVariables +# jobs: +# - template: templates/generate-localization.yml -# Run this stage only when specifically requested (via CreateOptimizationData) or when the pipeline was ran on a schedule. -- ${{ if or(eq(parameters.CreateOptimizationData, true), eq(variables['Build.Reason'], 'Schedule')) }}: - # This template is provided by the DartLabOptProfTemplates repo, declared in the repositories section (top of this file). - # It is a stage template, defining our entire Optimization stage. - - template: \templates\stages\visual-studio\single-runsettings.yml@DartLabOptProfTemplates - parameters: - name: Optimization - displayName: Optimization - dependsOn: - - Publish - # Only include the Compliance stage when it is not skipped. - - ${{ if eq(parameters.SkipCompliance, false) }}: - - Compliance - variables: - - name: visualStudioBootstrapperURI - # If you set this value to the visualStudioBootstrapperURI parameter directly, it does not resolve correctly. Instead, we set it to a variable and pass that variable into the parameter. - # For parameter, variable, and expression syntax/usage, see: - # - https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#understand-variable-syntax - # - https://docs.microsoft.com/azure/devops/pipelines/process/expressions?view=azure-devops - # - https://docs.microsoft.com/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script#how-can-i-use-variables-inside-of-templates - # For variables across stages, see: - # - https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-outputs-in-a-different-stage - # - https://arunksingh16.medium.com/azure-devops-share-variable-across-stages-9bca85abfe8a - # - https://stackoverflow.com/a/57488169/294804 - # - https://github.com/microsoft/azure-pipelines-tasks/issues/4743 - value: $[ stageDependencies.Publish.PublishAssetsAndPackages.outputs['UpdateRunSettings.visualStudioBootstrapperURI'] ] - runSettingsURI: https://vsdrop.corp.microsoft.com/file/v1/RunSettings/$(System.TeamProject)/dotnet/project-system/$(Build.SourceBranchName)/$(Build.BuildId);OptProf.runsettings - # This variable is set during the 'Update RunSettings' (UpdateRunSettings.ps1) step in the publish-assets-and-packages.yml. - # This variable is expanded when it is used: https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#macro-syntax-variables - visualStudioBootstrapperURI: $(visualStudioBootstrapperURI) - # The output of the optimization process. The first half of the path is provided to the DropNamePrefix input in the 'Install OptProf Plugin' (MicroBuildOptProfPlugin) step in build-official-release.yml. - optOptimizationInputsDropName: OptimizationInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceVersion)/$(Build.BuildId)/$(System.StageAttempt) - testLabPoolName: VS-Platform - previousOptimizationInputsDropName: $(previousOptimizationInputsDropName) - prePublishOptimizationInputsDropStepList: - # This extracts the Metadata.json file information from the OptProf artifact in the build and sets the drop name to the previousOptimizationInputsDropName variable. - # The previousOptimizationInputsDropName variable enables LKG (Last Known Good) support. - # See LKG support for details: https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/29053/Enabling-LKG-support - # This PowerShell script needs to be written in this YAML file directly as the job that runs this task does not have access to files on-disk (it does not perform a checkout). - - powershell: | - $artifactParameters = @{ - InstanceURL = 'https://dev.azure.com/devdiv' - ProjectName = 'DevDiv' - BuildID = '$(Build.BuildId)' - ArtifactName = 'OptProf' - OAuthAccessToken = (ConvertTo-SecureString '$(System.AccessToken)' -AsPlainText -Force) - } - $artifact = Get-BuildArtifact @artifactParameters - $containerName = $artifact.Resource.Data -Split '/' | Select-Object -Last 1 - $metadataString = Read-BuildArtifactFile @artifactParameters -FileName (Join-Path $containerName 'Metadata.json') - $dropName = ($metadataString | ConvertFrom-Json).OptimizationData +# # Run this stage only when specifically requested (via CreateOptimizationData) or when the pipeline was ran on a schedule. +# - ${{ if or(eq(parameters.CreateOptimizationData, true), eq(variables['Build.Reason'], 'Schedule')) }}: +# # This template is provided by the DartLabOptProfTemplates repo, declared in the repositories section (top of this file). +# # It is a stage template, defining our entire Optimization stage. +# - template: \templates\stages\visual-studio\single-runsettings.yml@DartLabOptProfTemplates +# parameters: +# name: Optimization +# displayName: Optimization +# dependsOn: +# - Publish +# # Only include the Compliance stage when it is not skipped. +# - ${{ if eq(parameters.SkipCompliance, false) }}: +# - Compliance +# variables: +# - name: visualStudioBootstrapperURI +# # If you set this value to the visualStudioBootstrapperURI parameter directly, it does not resolve correctly. Instead, we set it to a variable and pass that variable into the parameter. +# # For parameter, variable, and expression syntax/usage, see: +# # - https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#understand-variable-syntax +# # - https://docs.microsoft.com/azure/devops/pipelines/process/expressions?view=azure-devops +# # - https://docs.microsoft.com/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script#how-can-i-use-variables-inside-of-templates +# # For variables across stages, see: +# # - https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-outputs-in-a-different-stage +# # - https://arunksingh16.medium.com/azure-devops-share-variable-across-stages-9bca85abfe8a +# # - https://stackoverflow.com/a/57488169/294804 +# # - https://github.com/microsoft/azure-pipelines-tasks/issues/4743 +# value: $[ stageDependencies.Publish.PublishAssetsAndPackages.outputs['UpdateRunSettings.visualStudioBootstrapperURI'] ] +# runSettingsURI: https://vsdrop.corp.microsoft.com/file/v1/RunSettings/$(System.TeamProject)/dotnet/project-system/$(Build.SourceBranchName)/$(Build.BuildId);OptProf.runsettings +# # This variable is set during the 'Update RunSettings' (UpdateRunSettings.ps1) step in the publish-assets-and-packages.yml. +# # This variable is expanded when it is used: https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#macro-syntax-variables +# visualStudioBootstrapperURI: $(visualStudioBootstrapperURI) +# # The output of the optimization process. The first half of the path is provided to the DropNamePrefix input in the 'Install OptProf Plugin' (MicroBuildOptProfPlugin) step in build-official-release.yml. +# optOptimizationInputsDropName: OptimizationInputs/$(System.TeamProject)/$(Build.Repository.Name)/$(Build.SourceVersion)/$(Build.BuildId)/$(System.StageAttempt) +# testLabPoolName: VS-Platform +# previousOptimizationInputsDropName: $(previousOptimizationInputsDropName) +# prePublishOptimizationInputsDropStepList: +# # This extracts the Metadata.json file information from the OptProf artifact in the build and sets the drop name to the previousOptimizationInputsDropName variable. +# # The previousOptimizationInputsDropName variable enables LKG (Last Known Good) support. +# # See LKG support for details: https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/29053/Enabling-LKG-support +# # This PowerShell script needs to be written in this YAML file directly as the job that runs this task does not have access to files on-disk (it does not perform a checkout). +# - powershell: | +# $artifactParameters = @{ +# InstanceURL = 'https://dev.azure.com/devdiv' +# ProjectName = 'DevDiv' +# BuildID = '$(Build.BuildId)' +# ArtifactName = 'OptProf' +# OAuthAccessToken = (ConvertTo-SecureString '$(System.AccessToken)' -AsPlainText -Force) +# } +# $artifact = Get-BuildArtifact @artifactParameters +# $containerName = $artifact.Resource.Data -Split '/' | Select-Object -Last 1 +# $metadataString = Read-BuildArtifactFile @artifactParameters -FileName (Join-Path $containerName 'Metadata.json') +# $dropName = ($metadataString | ConvertFrom-Json).OptimizationData - Write-Host "previousOptimizationInputsDropName: $dropName" - Set-AzurePipelinesVariable 'previousOptimizationInputsDropName' $dropName - displayName: Set previousOptimizationInputsDropName variable +# Write-Host "previousOptimizationInputsDropName: $dropName" +# Set-AzurePipelinesVariable 'previousOptimizationInputsDropName' $dropName +# displayName: Set previousOptimizationInputsDropName variable # Run this stage only when specifically requested (via CreateVSInsertion or CreateVSGreenInsertion) or when the pipeline was ran on a schedule. # Conditional insertion syntax: @@ -283,10 +283,10 @@ stages: dependsOn: # The Build dependsOn is required for putting that stage's variables into the stageDependencies property bag (for PackageVersion). - Build - - Publish - # Only include the Compliance stage when it is not skipped. - - ${{ if eq(parameters.SkipCompliance, false) }}: - - Compliance + # - Publish + # # Only include the Compliance stage when it is not skipped. + # - ${{ if eq(parameters.SkipCompliance, false) }}: + # - Compliance variables: # Gets the PackageVersion variable produced by the Build pipeline. PackageVersion: $[ stageDependencies.Build.BuildOfficialRelease.outputs['SetPackageVersion.PackageVersion'] ] @@ -300,8 +300,8 @@ stages: InsertNpmDependencies: '@microsoft/microsoft.visualstudio.projectsystem.managed@$(PackageVersion)' InsertReviewers: '.NET Project System' jobs: - - ${{ if or(eq(parameters.CreateVSInsertion, true), eq(variables['Build.Reason'], 'Schedule')) }}: - - template: templates/generate-vs-insertion.yml + # - ${{ if or(eq(parameters.CreateVSInsertion, true), eq(variables['Build.Reason'], 'Schedule')) }}: + # - template: templates/generate-vs-insertion.yml - ${{ if or(eq(parameters.CreateVSGreenInsertion, true), eq(variables['Build.Reason'], 'Schedule')) }}: - template: azure-pipelines/external/component-insertion.yml@VSCodeExtensionRepo @@ -315,6 +315,6 @@ stages: ComponentSubDir: $(Build.Repository.Name) SetAutoComplete: false - - template: eng/pipelines/templates/upgrade-version.yml@ProjectSystemVSCodeExtensionRepo - parameters: - packageVersion: $(PackageVersion) + # - template: eng/pipelines/templates/upgrade-version.yml@ProjectSystemVSCodeExtensionRepo + # parameters: + # packageVersion: $(PackageVersion)