From c072e89e57d2dad151445c371686a4eca2094455 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 May 2025 06:04:04 +0000 Subject: [PATCH 1/3] Initial plan for issue From 66fc57493f931c5c4004fd8bb0be0313614150be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 May 2025 06:08:32 +0000 Subject: [PATCH 2/3] Created version-only PR build templates Co-authored-by: MuyuanMS <116717757+MuyuanMS@users.noreply.github.com> --- ...ectReunion-BuildFoundation-VersionOnly.yml | 46 +++++++ ...indowsAppSDK-Foundation-PR-VersionOnly.yml | 118 ++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 build/ProjectReunion-BuildFoundation-VersionOnly.yml create mode 100644 build/WindowsAppSDK-Foundation-PR-VersionOnly.yml diff --git a/build/ProjectReunion-BuildFoundation-VersionOnly.yml b/build/ProjectReunion-BuildFoundation-VersionOnly.yml new file mode 100644 index 0000000000..5a3374af2c --- /dev/null +++ b/build/ProjectReunion-BuildFoundation-VersionOnly.yml @@ -0,0 +1,46 @@ +# This file has been adapted to use as a non-OneBranch PR validation yml in the WindowsAppSDK Foundation repository +# Prior to 1.4, this file was used to build official release builds. This role has been moved to WindowsAppSDK-Foundation-Release.yml + +name: $(version) + +trigger: none + +variables: +- template: WindowsAppSDK-Versions.yml +- template: WindowsAppSDK-CommonVariables.yml +- template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig +- template: WindowsAppSDK-SetSourceBranchVariableForConfigRepo.yml@WindowsAppSDKConfig + +resources: + repositories: + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKConfigSourceBranch + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: ${{ variables['mySourceBranch'] }} + +stages: +- template: AzurePipelinesTemplates\WindowsAppSDK-BuildInstaller-Stage.yml@self + +- template: AzurePipelinesTemplates\WindowsAppSDK-BuildVSIX-Stage.yml@self + +- template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self + parameters: + SignOutput: false + IsOneBranch: false + runApiScan: false + runPREFast: false + +- template: AzurePipelinesTemplates\WindowsAppSDK-Test-Stage.yml@self + parameters: + testMatrix: ${{ variables.PipelineTests }} + +- template: AzurePipelinesTemplates\WindowsAppSDK-PackTransportPackage-Stage.yml@self + parameters: + SignOutput: false + PublishPackage: false + IsOneBranch: false + BuildMockWindowsAppSDK: false \ No newline at end of file diff --git a/build/WindowsAppSDK-Foundation-PR-VersionOnly.yml b/build/WindowsAppSDK-Foundation-PR-VersionOnly.yml new file mode 100644 index 0000000000..e8cafe7f6e --- /dev/null +++ b/build/WindowsAppSDK-Foundation-PR-VersionOnly.yml @@ -0,0 +1,118 @@ +##################################################################################################################################### +# OneBranch Pipelines - Official # +##################################################################################################################################### +# # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# # +# Windows Undocked Wiki: https://www.osgwiki.com/wiki/Windows_Undocked_Template # +# General OB Documentation: https://aka.ms/obpipelines # +# Build MSBuild project: https://dev.azure.com/onebranch/OneBranch/_wiki/wikis/OneBranch.wiki/6045/Build-MSBuild-project # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +# # +##################################################################################################################################### + +name: $(version) + +# https://aka.ms/obpipelines/triggers +trigger: none + +parameters: # parameters are shown up in ADO UI in a build queue time +- name: runStaticAnalysis + displayName: "Run Static Analysis (e.g., PREFast, APIScan)" + type: boolean + default: false + +variables: +- template: WindowsAppSDK-Versions.yml +- template: WindowsAppSDK-CommonVariables.yml +- template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig +- template: WindowsAppSDK-SetSourceBranchVariableForConfigRepo.yml@WindowsAppSDKConfig + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKConfigSourceBranch + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: ${{ variables['mySourceBranch'] }} + +extends: + template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + parameters: + featureFlags: + EnableCDPxPAT: false + WindowsHostVersion: + Network: R1 + + platform: + name: 'windows_undocked' # windows undocked + + cloudvault: # Please refer the wiki for more information: https://aka.ms/obpipelines/cloudvault + enabled: false + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. Please provide TSAOptions.json. + isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed + suppression: + suppressionFile: $(Build.SourcesDirectory)\.gdn\OneBranch.gdnsuppress + psscriptanalyzer: + enable: true + break: true + binskim: + enabled: true + break: true + analyzeTargetGlob: +:f|**.exe;+:f|**.dll;-:f|**\packages\**\*.dll;-:f|**\packages\**\*.exe + prefast: + ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + enabled: true + ${{ else }}: + enabled: false + break: true + # Use "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. + # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. + # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. + severity: Default + # Use "exclusionsFile: <>" to apply a local exclusion file. + apiscan: + # We will enable APIScan on a per-job basis downstream as needed. + enabled: false + # TODO: Once we've cleared away all existing errors, consider setting this to true. + break: false + + stages: + - template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self + parameters: + SignOutput: false + runApiScan: ${{ parameters.runStaticAnalysis }} + runPREFast: false + + - ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + - template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self + parameters: + SignOutput: false + runApiScan: false + runPREFast: true + + - template: AzurePipelinesTemplates\WindowsAppSDK-PackTransportPackage-Stage.yml@self + parameters: + SignOutput: false + PublishPackage: false + + - template: AzurePipelinesTemplates\WindowsAppSDK-StaticValidationTest-Stage.yml@self + parameters: + SignOutput: false + + - template: AzurePipelinesTemplates\WindowsAppSDK-Test-Stage.yml@self + parameters: + testMatrix: ${{ variables.PipelineTests }} \ No newline at end of file From 94e688b67d83947b54d17dacc7ea6b90295a90fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 May 2025 08:17:41 +0000 Subject: [PATCH 3/3] Refactored YML templates to eliminate code duplication Co-authored-by: MuyuanMS <116717757+MuyuanMS@users.noreply.github.com> --- .../ProjectReunion-BuildFoundation-Core.yml | 65 ++++++++++ .../WindowsAppSDK-Foundation-PR-Core.yml | 111 ++++++++++++++++++ ...ectReunion-BuildFoundation-VersionOnly.yml | 48 +------- build/ProjectReunion-BuildFoundation.yml | 51 +------- ...indowsAppSDK-Foundation-PR-VersionOnly.yml | 104 +--------------- build/WindowsAppSDK-Foundation-PR.yml | 104 +--------------- 6 files changed, 194 insertions(+), 289 deletions(-) create mode 100644 build/AzurePipelinesTemplates/ProjectReunion-BuildFoundation-Core.yml create mode 100644 build/AzurePipelinesTemplates/WindowsAppSDK-Foundation-PR-Core.yml diff --git a/build/AzurePipelinesTemplates/ProjectReunion-BuildFoundation-Core.yml b/build/AzurePipelinesTemplates/ProjectReunion-BuildFoundation-Core.yml new file mode 100644 index 0000000000..2fca102f2d --- /dev/null +++ b/build/AzurePipelinesTemplates/ProjectReunion-BuildFoundation-Core.yml @@ -0,0 +1,65 @@ +# Core template for ProjectReunion BuildFoundation +# This file contains the shared logic used by both standard and version-only builds +# to reduce code duplication and improve maintainability. + +parameters: + # Controls whether to run API scan during the build + - name: runApiScan + type: boolean + default: true + # Controls whether to run PREFast during the build + - name: runPREFast + type: boolean + default: true + +name: $(version) + +trigger: none + +variables: +- template: ../WindowsAppSDK-Versions.yml +- template: ../WindowsAppSDK-CommonVariables.yml +- template: ../WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig +- template: ../WindowsAppSDK-SetSourceBranchVariableForConfigRepo.yml@WindowsAppSDKConfig + +resources: + repositories: + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKConfigSourceBranch + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: ${{ variables['mySourceBranch'] }} + +stages: +- template: WindowsAppSDK-BuildInstaller-Stage.yml@self + +- template: WindowsAppSDK-BuildVSIX-Stage.yml@self + +- template: WindowsAppSDK-Build-Stage.yml@self + parameters: + SignOutput: false + IsOneBranch: false + runApiScan: ${{ parameters.runApiScan }} + runPREFast: false + +- ${{ if eq(parameters.runPREFast, 'true') }}: + - template: WindowsAppSDK-Build-Stage.yml@self + parameters: + SignOutput: false + IsOneBranch: false + runApiScan: false + runPREFast: true + +- template: WindowsAppSDK-Test-Stage.yml@self + parameters: + testMatrix: ${{ variables.PipelineTests }} + +- template: WindowsAppSDK-PackTransportPackage-Stage.yml@self + parameters: + SignOutput: false + PublishPackage: false + IsOneBranch: false + BuildMockWindowsAppSDK: false \ No newline at end of file diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-Foundation-PR-Core.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-Foundation-PR-Core.yml new file mode 100644 index 0000000000..6257fcc6d2 --- /dev/null +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-Foundation-PR-Core.yml @@ -0,0 +1,111 @@ +##################################################################################################################################### +# OneBranch Pipelines - Foundation PR Core # +##################################################################################################################################### +# # +# This is a core template file for PR validation builds. It contains the shared logic used by both standard # +# and version-only PR builds to reduce code duplication and improve maintainability. # +# # +##################################################################################################################################### + +parameters: + # Controls whether to run static analysis during the build + - name: runStaticAnalysis + type: boolean + default: true + +name: $(version) + +# https://aka.ms/obpipelines/triggers +trigger: none + +variables: +- template: ../WindowsAppSDK-Versions.yml +- template: ../WindowsAppSDK-CommonVariables.yml +- template: ../WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig +- template: ../WindowsAppSDK-SetSourceBranchVariableForConfigRepo.yml@WindowsAppSDKConfig + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKConfigSourceBranch + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: ${{ variables['mySourceBranch'] }} + +extends: + template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + parameters: + featureFlags: + EnableCDPxPAT: false + WindowsHostVersion: + Network: R1 + + platform: + name: 'windows_undocked' # windows undocked + + cloudvault: # Please refer the wiki for more information: https://aka.ms/obpipelines/cloudvault + enabled: false + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. Please provide TSAOptions.json. + isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed + suppression: + suppressionFile: $(Build.SourcesDirectory)\.gdn\OneBranch.gdnsuppress + psscriptanalyzer: + enable: true + break: true + binskim: + enabled: true + break: true + analyzeTargetGlob: +:f|**.exe;+:f|**.dll;-:f|**\packages\**\*.dll;-:f|**\packages\**\*.exe + prefast: + ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + enabled: true + ${{ else }}: + enabled: false + break: true + # Use "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. + # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. + # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. + severity: Default + # Use "exclusionsFile: <>" to apply a local exclusion file. + apiscan: + # We will enable APIScan on a per-job basis downstream as needed. + enabled: false + # TODO: Once we've cleared away all existing errors, consider setting this to true. + break: false + + stages: + - template: WindowsAppSDK-Build-Stage.yml@self + parameters: + SignOutput: false + runApiScan: ${{ parameters.runStaticAnalysis }} + runPREFast: false + + - ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + - template: WindowsAppSDK-Build-Stage.yml@self + parameters: + SignOutput: false + runApiScan: false + runPREFast: true + + - template: WindowsAppSDK-PackTransportPackage-Stage.yml@self + parameters: + SignOutput: false + PublishPackage: false + + - template: WindowsAppSDK-StaticValidationTest-Stage.yml@self + parameters: + SignOutput: false + + - template: WindowsAppSDK-Test-Stage.yml@self + parameters: + testMatrix: ${{ variables.PipelineTests }} \ No newline at end of file diff --git a/build/ProjectReunion-BuildFoundation-VersionOnly.yml b/build/ProjectReunion-BuildFoundation-VersionOnly.yml index 5a3374af2c..d22dcc0a41 100644 --- a/build/ProjectReunion-BuildFoundation-VersionOnly.yml +++ b/build/ProjectReunion-BuildFoundation-VersionOnly.yml @@ -1,46 +1,10 @@ # This file has been adapted to use as a non-OneBranch PR validation yml in the WindowsAppSDK Foundation repository -# Prior to 1.4, this file was used to build official release builds. This role has been moved to WindowsAppSDK-Foundation-Release.yml +# This version is optimized for version-only changes that don't require static analysis -name: $(version) - -trigger: none - -variables: -- template: WindowsAppSDK-Versions.yml -- template: WindowsAppSDK-CommonVariables.yml -- template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig -- template: WindowsAppSDK-SetSourceBranchVariableForConfigRepo.yml@WindowsAppSDKConfig - -resources: - repositories: - - repository: WindowsAppSDKConfig - type: git - name: ProjectReunion/WindowsAppSDKConfig - ref: refs/heads/main - - repository: WindowsAppSDKConfigSourceBranch - type: git - name: ProjectReunion/WindowsAppSDKConfig - ref: ${{ variables['mySourceBranch'] }} - -stages: -- template: AzurePipelinesTemplates\WindowsAppSDK-BuildInstaller-Stage.yml@self - -- template: AzurePipelinesTemplates\WindowsAppSDK-BuildVSIX-Stage.yml@self - -- template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self +# Import the core template file with parameters set for version-only PR builds +# API scan and PREFast are disabled for these builds to improve efficiency +extends: + template: AzurePipelinesTemplates/ProjectReunion-BuildFoundation-Core.yml@self parameters: - SignOutput: false - IsOneBranch: false runApiScan: false - runPREFast: false - -- template: AzurePipelinesTemplates\WindowsAppSDK-Test-Stage.yml@self - parameters: - testMatrix: ${{ variables.PipelineTests }} - -- template: AzurePipelinesTemplates\WindowsAppSDK-PackTransportPackage-Stage.yml@self - parameters: - SignOutput: false - PublishPackage: false - IsOneBranch: false - BuildMockWindowsAppSDK: false \ No newline at end of file + runPREFast: false \ No newline at end of file diff --git a/build/ProjectReunion-BuildFoundation.yml b/build/ProjectReunion-BuildFoundation.yml index bd224bec1a..17e51d23d4 100644 --- a/build/ProjectReunion-BuildFoundation.yml +++ b/build/ProjectReunion-BuildFoundation.yml @@ -1,53 +1,10 @@ # This file has been adapted to use as a non-OneBranch PR validation yml in the WindowsAppSDK Foundation repository # Prior to 1.4, this file was used to build official release builds. This role has been moved to WindowsAppSDK-Foundation-Release.yml -name: $(version) - -trigger: none - -variables: -- template: WindowsAppSDK-Versions.yml -- template: WindowsAppSDK-CommonVariables.yml -- template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig -- template: WindowsAppSDK-SetSourceBranchVariableForConfigRepo.yml@WindowsAppSDKConfig - -resources: - repositories: - - repository: WindowsAppSDKConfig - type: git - name: ProjectReunion/WindowsAppSDKConfig - ref: refs/heads/main - - repository: WindowsAppSDKConfigSourceBranch - type: git - name: ProjectReunion/WindowsAppSDKConfig - ref: ${{ variables['mySourceBranch'] }} - -stages: -- template: AzurePipelinesTemplates\WindowsAppSDK-BuildInstaller-Stage.yml@self - -- template: AzurePipelinesTemplates\WindowsAppSDK-BuildVSIX-Stage.yml@self - -- template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self +# Import the core template file with default parameters for standard builds +# This keeps existing behavior (API scan and PREFast enabled) +extends: + template: AzurePipelinesTemplates/ProjectReunion-BuildFoundation-Core.yml@self parameters: - SignOutput: false - IsOneBranch: false runApiScan: true - runPREFast: false - -- template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self - parameters: - SignOutput: false - IsOneBranch: false - runApiScan: false runPREFast: true - -- template: AzurePipelinesTemplates\WindowsAppSDK-Test-Stage.yml@self - parameters: - testMatrix: ${{ variables.PipelineTests }} - -- template: AzurePipelinesTemplates\WindowsAppSDK-PackTransportPackage-Stage.yml@self - parameters: - SignOutput: false - PublishPackage: false - IsOneBranch: false - BuildMockWindowsAppSDK: false diff --git a/build/WindowsAppSDK-Foundation-PR-VersionOnly.yml b/build/WindowsAppSDK-Foundation-PR-VersionOnly.yml index e8cafe7f6e..aca7b62ba4 100644 --- a/build/WindowsAppSDK-Foundation-PR-VersionOnly.yml +++ b/build/WindowsAppSDK-Foundation-PR-VersionOnly.yml @@ -14,105 +14,9 @@ # # ##################################################################################################################################### -name: $(version) - -# https://aka.ms/obpipelines/triggers -trigger: none - -parameters: # parameters are shown up in ADO UI in a build queue time -- name: runStaticAnalysis - displayName: "Run Static Analysis (e.g., PREFast, APIScan)" - type: boolean - default: false - -variables: -- template: WindowsAppSDK-Versions.yml -- template: WindowsAppSDK-CommonVariables.yml -- template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig -- template: WindowsAppSDK-SetSourceBranchVariableForConfigRepo.yml@WindowsAppSDKConfig - -resources: - repositories: - - repository: templates - type: git - name: OneBranch.Pipelines/GovernedTemplates - ref: refs/heads/main - - repository: WindowsAppSDKConfig - type: git - name: ProjectReunion/WindowsAppSDKConfig - ref: refs/heads/main - - repository: WindowsAppSDKConfigSourceBranch - type: git - name: ProjectReunion/WindowsAppSDKConfig - ref: ${{ variables['mySourceBranch'] }} - +# Import the core template file with parameters set for version-only PR builds +# Static analysis is disabled for these builds to improve efficiency extends: - template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + template: AzurePipelinesTemplates/WindowsAppSDK-Foundation-PR-Core.yml@self parameters: - featureFlags: - EnableCDPxPAT: false - WindowsHostVersion: - Network: R1 - - platform: - name: 'windows_undocked' # windows undocked - - cloudvault: # Please refer the wiki for more information: https://aka.ms/obpipelines/cloudvault - enabled: false - - globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl - tsa: - enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. Please provide TSAOptions.json. - isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed - suppression: - suppressionFile: $(Build.SourcesDirectory)\.gdn\OneBranch.gdnsuppress - psscriptanalyzer: - enable: true - break: true - binskim: - enabled: true - break: true - analyzeTargetGlob: +:f|**.exe;+:f|**.dll;-:f|**\packages\**\*.dll;-:f|**\packages\**\*.exe - prefast: - ${{ if eq(parameters.runStaticAnalysis, 'true') }}: - enabled: true - ${{ else }}: - enabled: false - break: true - # Use "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. - # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. - # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. - severity: Default - # Use "exclusionsFile: <>" to apply a local exclusion file. - apiscan: - # We will enable APIScan on a per-job basis downstream as needed. - enabled: false - # TODO: Once we've cleared away all existing errors, consider setting this to true. - break: false - - stages: - - template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self - parameters: - SignOutput: false - runApiScan: ${{ parameters.runStaticAnalysis }} - runPREFast: false - - - ${{ if eq(parameters.runStaticAnalysis, 'true') }}: - - template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self - parameters: - SignOutput: false - runApiScan: false - runPREFast: true - - - template: AzurePipelinesTemplates\WindowsAppSDK-PackTransportPackage-Stage.yml@self - parameters: - SignOutput: false - PublishPackage: false - - - template: AzurePipelinesTemplates\WindowsAppSDK-StaticValidationTest-Stage.yml@self - parameters: - SignOutput: false - - - template: AzurePipelinesTemplates\WindowsAppSDK-Test-Stage.yml@self - parameters: - testMatrix: ${{ variables.PipelineTests }} \ No newline at end of file + runStaticAnalysis: false \ No newline at end of file diff --git a/build/WindowsAppSDK-Foundation-PR.yml b/build/WindowsAppSDK-Foundation-PR.yml index a8bbf710f4..6970a895c7 100644 --- a/build/WindowsAppSDK-Foundation-PR.yml +++ b/build/WindowsAppSDK-Foundation-PR.yml @@ -14,105 +14,9 @@ # # ##################################################################################################################################### -name: $(version) - -# https://aka.ms/obpipelines/triggers -trigger: none - -parameters: # parameters are shown up in ADO UI in a build queue time -- name: runStaticAnalysis - displayName: "Run Static Analysis (e.g., PREFast, APIScan)" - type: boolean - default: true - -variables: -- template: WindowsAppSDK-Versions.yml -- template: WindowsAppSDK-CommonVariables.yml -- template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig -- template: WindowsAppSDK-SetSourceBranchVariableForConfigRepo.yml@WindowsAppSDKConfig - -resources: - repositories: - - repository: templates - type: git - name: OneBranch.Pipelines/GovernedTemplates - ref: refs/heads/main - - repository: WindowsAppSDKConfig - type: git - name: ProjectReunion/WindowsAppSDKConfig - ref: refs/heads/main - - repository: WindowsAppSDKConfigSourceBranch - type: git - name: ProjectReunion/WindowsAppSDKConfig - ref: ${{ variables['mySourceBranch'] }} - +# Import the core template file with default parameters for standard PR builds +# This keeps existing behavior (static analysis enabled by default) extends: - template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + template: AzurePipelinesTemplates/WindowsAppSDK-Foundation-PR-Core.yml@self parameters: - featureFlags: - EnableCDPxPAT: false - WindowsHostVersion: - Network: R1 - - platform: - name: 'windows_undocked' # windows undocked - - cloudvault: # Please refer the wiki for more information: https://aka.ms/obpipelines/cloudvault - enabled: false - - globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl - tsa: - enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. Please provide TSAOptions.json. - isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed - suppression: - suppressionFile: $(Build.SourcesDirectory)\.gdn\OneBranch.gdnsuppress - psscriptanalyzer: - enable: true - break: true - binskim: - enabled: true - break: true - analyzeTargetGlob: +:f|**.exe;+:f|**.dll;-:f|**\packages\**\*.dll;-:f|**\packages\**\*.exe - prefast: - ${{ if eq(parameters.runStaticAnalysis, 'true') }}: - enabled: true - ${{ else }}: - enabled: false - break: true - # Use "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. - # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. - # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. - severity: Default - # Use "exclusionsFile: <>" to apply a local exclusion file. - apiscan: - # We will enable APIScan on a per-job basis downstream as needed. - enabled: false - # TODO: Once we've cleared away all existing errors, consider setting this to true. - break: false - - stages: - - template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self - parameters: - SignOutput: false - runApiScan: ${{ parameters.runStaticAnalysis }} - runPREFast: false - - - ${{ if eq(parameters.runStaticAnalysis, 'true') }}: - - template: AzurePipelinesTemplates\WindowsAppSDK-Build-Stage.yml@self - parameters: - SignOutput: false - runApiScan: false - runPREFast: true - - - template: AzurePipelinesTemplates\WindowsAppSDK-PackTransportPackage-Stage.yml@self - parameters: - SignOutput: false - PublishPackage: false - - - template: AzurePipelinesTemplates\WindowsAppSDK-StaticValidationTest-Stage.yml@self - parameters: - SignOutput: false - - - template: AzurePipelinesTemplates\WindowsAppSDK-Test-Stage.yml@self - parameters: - testMatrix: ${{ variables.PipelineTests }} + runStaticAnalysis: true