From 70bf82b1f42094e4f7d534a1f4cf8b65beb3ab82 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Wed, 5 May 2021 13:01:46 -0700 Subject: [PATCH] Update YAML to include SymbolPublish (#1137) This PR adds in the symbol publishing step for the releases --- eng/pipelines/VS-release.yml | 2 +- eng/pipelines/VSCode-release.yml | 2 +- ...019.yml => VSEng-MicroBuildVS2019.job.yml} | 0 eng/pipelines/steps/CopyAndPublishSymbols.yml | 7 + eng/pipelines/tasks/PublishSymbols.yml | 126 ++++++++++++++++++ 5 files changed, 135 insertions(+), 2 deletions(-) rename eng/pipelines/jobs/{VSEng-MicroBuildVS2019.yml => VSEng-MicroBuildVS2019.job.yml} (100%) create mode 100644 eng/pipelines/tasks/PublishSymbols.yml diff --git a/eng/pipelines/VS-release.yml b/eng/pipelines/VS-release.yml index 8b95a726c..065295dca 100644 --- a/eng/pipelines/VS-release.yml +++ b/eng/pipelines/VS-release.yml @@ -1,7 +1,7 @@ --- name: $(Date:yyyMMdd).$(Rev:r) jobs: -- template: ./jobs/VSEng-MicroBuildVS2019.yml +- template: ./jobs/VSEng-MicroBuildVS2019.job.yml parameters: JobName: VS_Release BuildTemplate: 'VS-release' diff --git a/eng/pipelines/VSCode-release.yml b/eng/pipelines/VSCode-release.yml index 3ee72373e..3f01eab42 100644 --- a/eng/pipelines/VSCode-release.yml +++ b/eng/pipelines/VSCode-release.yml @@ -1,7 +1,7 @@ --- name: $(Date:yyyMMdd).$(Rev:r) jobs: -- template: ./jobs/VSEng-MicroBuildVS2019.yml +- template: ./jobs/VSEng-MicroBuildVS2019.job.yml parameters: JobName: VSCode_Release BuildTemplate: 'VSCode-release' diff --git a/eng/pipelines/jobs/VSEng-MicroBuildVS2019.yml b/eng/pipelines/jobs/VSEng-MicroBuildVS2019.job.yml similarity index 100% rename from eng/pipelines/jobs/VSEng-MicroBuildVS2019.yml rename to eng/pipelines/jobs/VSEng-MicroBuildVS2019.job.yml diff --git a/eng/pipelines/steps/CopyAndPublishSymbols.yml b/eng/pipelines/steps/CopyAndPublishSymbols.yml index 133c094bd..c3ff57777 100644 --- a/eng/pipelines/steps/CopyAndPublishSymbols.yml +++ b/eng/pipelines/steps/CopyAndPublishSymbols.yml @@ -9,6 +9,13 @@ steps: TargetFolder: '$(Build.ArtifactStagingDirectory)/symbols' CleanTargetFolder: true +- template: ../tasks/PublishSymbols.yml + parameters: + IndexSources: false + SymbolsFolder: '$(Build.ArtifactStagingDirectory)/symbols' + SearchPattern: '**\*.pdb' + SymbolServerType: TeamServices + - template: ../tasks/PublishPipelineArtifact.yml parameters: displayName: 'Publish Symbols' diff --git a/eng/pipelines/tasks/PublishSymbols.yml b/eng/pipelines/tasks/PublishSymbols.yml new file mode 100644 index 000000000..2f3b24f6f --- /dev/null +++ b/eng/pipelines/tasks/PublishSymbols.yml @@ -0,0 +1,126 @@ +# PublishSymbols +# +# Index your source code and publish symbols to a file share or Azure Artifacts symbol server +# +# Version: 2.172.0 +# +# Reference: https://docs.microsoft.com/azure/devops/pipelines/tasks/build/index-sources-publish-symbols +# Task.json: https://raw.githubusercontent.com/microsoft/azure-pipelines-tasks/master/Tasks/PublishSymbolsV2/task.json +--- +parameters: + # region Step Configurations + + displayName: 'Publish symbols path' + enabled: true + continueOnError: false + condition: succeeded() + timeoutInMinutes: 0 + + # endregion + + # region Advanced + + # Verbose logging + # + # Use verbose logging. + DetailedLog : true # Optional + + # Warn if not indexed + # + # Indicates whether to warn if sources are not indexed for a PDB file. Otherwise the messages are logged + # as normal output. + TreatNotIndexedAsWarning : false # Optional + + # Max wait time (min) + # + # The number of minutes to wait before failing this task. + SymbolsMaximumWaitTime : "" # Optional + + # Product + # + # Specify the product parameter to symstore.exe. The default is $(Build.DefinitionName) + SymbolsProduct : "" # Optional + + # Version + # + # Specify the version parameter to symstore.exe. The default is $(Build.BuildNumber) + SymbolsVersion : "" # Optional + + # Artifact name + # + # Specify the artifact name to use for the Symbols artifact. The default is Symbols_$(BuildConfiguration) + SymbolsArtifactName : "Symbols_$(BuildConfiguration)" # Optional + + # endregion + + # region Ungrouped Configurations + + # Path to symbols folder + # + # The path to the folder that is searched for symbol files. The default is $(Build.SourcesDirectory). + # Otherwise specify a rooted path, for example: $(Build.BinariesDirectory)/MyProject + SymbolsFolder : "$(Build.SourcesDirectory)" # Optional + + # Search pattern + # + # The pattern used to discover the pdb files to publish. + SearchPattern : | # Required + **/bin/**/*.pdb + + # Index sources + # + # Indicates whether to inject source server information into the PDB files. + IndexSources : true # Optional + + # Publish symbols + # + # Indicates whether to publish the symbol files. + PublishSymbols : true # Optional + + # Symbol server type + # + # Choose where to publish symbols. Symbols published to the Azure Artifacts symbol server are accessible + # by any user with access to the organization/collection. Azure DevOps Server only supports the "File share" + # option. Follow [these instructions](https://go.microsoft.com/fwlink/?linkid=846265) to use Symbol Server + # in Azure Artifacts. + # Options: + # + # TeamServices + # FileShare + SymbolServerType : " " # Used when PublishSymbols = true + + # Path to publish symbols + # + # The file share that hosts your symbols. This value will be used in the call to `symstore.exe add` as + # the `/s` parameter. + SymbolsPath : "" # Used when PublishSymbols = true && SymbolServerType = FileShare + + # Compress symbols + # + # Compress symbols when publishing to file share. + CompressSymbols : false # Used when SymbolServerType = FileShare + + # endregion + +steps: +- task: PublishSymbols@2 + displayName: ${{ parameters.DisplayName }} + inputs: + SymbolsFolder : ${{ parameters.SymbolsFolder }} + SearchPattern : ${{ parameters.SearchPattern }} + IndexSources : ${{ parameters.IndexSources }} + PublishSymbols : ${{ parameters.PublishSymbols }} + SymbolServerType : ${{ parameters.SymbolServerType }} + SymbolsPath : ${{ parameters.SymbolsPath }} + CompressSymbols : ${{ parameters.CompressSymbols }} + DetailedLog : ${{ parameters.DetailedLog }} + TreatNotIndexedAsWarning : ${{ parameters.TreatNotIndexedAsWarning }} + SymbolsMaximumWaitTime : ${{ parameters.SymbolsMaximumWaitTime }} + SymbolsProduct : ${{ parameters.SymbolsProduct }} + SymbolsVersion : ${{ parameters.SymbolsVersion }} + SymbolsArtifactName : ${{ parameters.SymbolsArtifactName }} + enabled: ${{ parameters.enabled }} + condition: ${{ parameters.condition }} + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} + continueOnError: ${{ parameters.continueOnError }} +...