Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
111 changes: 111 additions & 0 deletions build/AzurePipelinesTemplates/WindowsAppSDK-Foundation-PR-Core.yml
Original file line number Diff line number Diff line change
@@ -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: <<FILE PATH>>" 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 }}
10 changes: 10 additions & 0 deletions build/ProjectReunion-BuildFoundation-VersionOnly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file has been adapted to use as a non-OneBranch PR validation yml in the WindowsAppSDK Foundation repository
# This version is optimized for version-only changes that don't require static analysis

# 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:
runApiScan: false
runPREFast: false
51 changes: 4 additions & 47 deletions build/ProjectReunion-BuildFoundation.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions build/WindowsAppSDK-Foundation-PR-VersionOnly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#####################################################################################################################################
# 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 #
# #
#####################################################################################################################################

# 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: AzurePipelinesTemplates/WindowsAppSDK-Foundation-PR-Core.yml@self
parameters:
runStaticAnalysis: false
104 changes: 4 additions & 100 deletions build/WindowsAppSDK-Foundation-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: <<FILE PATH>>" 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