From 3c41fea23c927a217718861de6ddc6eebd7da519 Mon Sep 17 00:00:00 2001 From: Chris Meyer Date: Mon, 15 Apr 2024 10:28:28 -1000 Subject: [PATCH] Create OneBranch.Official.yml --- .pipelines/OneBranch.Official.yml | 112 ++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 .pipelines/OneBranch.Official.yml diff --git a/.pipelines/OneBranch.Official.yml b/.pipelines/OneBranch.Official.yml new file mode 100644 index 00000000..bb8cd827 --- /dev/null +++ b/.pipelines/OneBranch.Official.yml @@ -0,0 +1,112 @@ +# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool. +# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected. +# The SBOM tasks have been removed because they are not required for the unofficial template. +# You can manually enable SBOM in the unofficial template if needed, othewise its automatically enabled when using official template. https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sbom +# This pipeline will be extended to the OneESPT template +# If you are not using the E+D shared hosted pool with windows-2022, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage +# The Task 'PublishBuildArtifacts@1' has been converted to an output named 'Publish Artifact: Viewer drop2019' in the templateContext section. +# The Task 'PublishBuildArtifacts@1' has been converted to an output named 'Publish Artifact: Viewer drop2022' in the templateContext section. +trigger: none +name: $(date:yyyyMMdd)$(rev:.r) +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + pool: + name: Azure-Pipelines-1ESPT-ExDShared + image: windows-2022 + os: windows + customBuildTags: + - ES365AIMigrationTooling + stages: + - stage: stage + jobs: + - job: Job_1 + displayName: Agent job 1 + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish Artifact: Viewer drop2019' + targetPath: bld\bin\AnyCpu_Release\Sarif.Viewer.VisualStudio\Microsoft.Sarif.Viewer.vsix + artifactName: viewer-drop2019 + - output: pipelineArtifact + displayName: 'Publish Artifact: Viewer drop2022' + targetPath: bld\bin\AnyCpu_Release\Sarif.Viewer.VisualStudio.2022\Microsoft.Sarif.Viewer.vsix + artifactName: viewer-drop2022 + steps: + - checkout: self + submodules: recursive + fetchTags: false + - task: BatchScript@1 + displayName: Run VsDevCmd.bat + inputs: + filename: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat + modifyEnvironment: true + - task: PowerShell@2 + displayName: Build and Test + inputs: + filePath: scripts/BuildAndTest.ps1 + - task: UseDotNet@2 + displayName: Use .NET Core sdk 2.1.x + inputs: + version: 2.1.x + - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 + displayName: ESRP CodeSigning Viewer 2019 + inputs: + ConnectedServiceName: DevSecOps-1ES + FolderPath: bld\bin\AnyCpu_Release\Sarif.Viewer.VisualStudio + Pattern: '*.vsix' + signConfigType: inlineSignParams + inlineOperation: |- + [ + { + "KeyCode" : "CP-233016", + "OperationCode" : "OpcSign", + "Parameters" : { + "FileDigest" : "/fd SHA256" + }, + "ToolName" : "sign", + "ToolVersion" : "1.0" + }, + { + "KeyCode" : "CP-233016", + "OperationCode" : "OpcVerify", + "Parameters" : {}, + "ToolName" : "sign", + "ToolVersion" : "1.0" + } + ] + - task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 + displayName: ESRP CodeSigning Viewer 2022 + inputs: + ConnectedServiceName: DevSecOps-1ES + FolderPath: bld\bin\AnyCpu_Release\Sarif.Viewer.VisualStudio.2022 + Pattern: '*.vsix' + signConfigType: inlineSignParams + inlineOperation: |- + [ + { + "KeyCode" : "CP-233016", + "OperationCode" : "OpcSign", + "Parameters" : { + "FileDigest" : "/fd SHA256" + }, + "ToolName" : "sign", + "ToolVersion" : "1.0" + }, + { + "KeyCode" : "CP-233016", + "OperationCode" : "OpcVerify", + "Parameters" : {}, + "ToolName" : "sign", + "ToolVersion" : "1.0" + } + ] \ No newline at end of file