Skip to content

Commit fe04ac6

Browse files
authored
[BuildFix] Fix APIScan config to properly honor parameters.runStaticAnalysis (#4459)
Enable APIScan according to parameters.runStaticAnalysis, instead of hardwiring it to be always enabled.
1 parent 2028ec5 commit fe04ac6

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

build/AzurePipelinesTemplates/WindowsAppSDK-Build-Stage.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ stages:
5555
ob_outputDirectory: '$(REPOROOT)\out'
5656
ob_sdl_codeSignValidation_excludes: '-|**\Release\**;-|**\packages\**'
5757
ob_artifactBaseName: "FoundationBinaries_$(buildConfiguration)_$(buildPlatform)"
58-
ob_sdl_apiscan_enabled: true
58+
${{ if parameters.runStaticAnalysis }}:
59+
ob_sdl_apiscan_enabled: true
60+
${{ if not( parameters.runStaticAnalysis ) }}:
61+
ob_sdl_apiscan_enabled: false
5962
ob_sdl_apiscan_softwareFolder: '$(build.SourcesDirectory)\APIScanTarget'
6063
ob_sdl_apiscan_symbolsFolder: '$(build.SourcesDirectory)\APIScanTarget;SRV*http://symweb'
6164
steps:
@@ -79,7 +82,10 @@ stages:
7982
ob_outputDirectory: '$(REPOROOT)\out'
8083
ob_sdl_codeSignValidation_excludes: '-|**\Release\**'
8184
ob_artifactBaseName: "FoundationBinaries_release_anycpu"
82-
ob_sdl_apiscan_enabled: true
85+
${{ if parameters.runStaticAnalysis }}:
86+
ob_sdl_apiscan_enabled: true
87+
${{ if not( parameters.runStaticAnalysis ) }}:
88+
ob_sdl_apiscan_enabled: false
8389
ob_sdl_apiscan_softwareFolder: '$(build.SourcesDirectory)\BuildOutput\Release\AnyCPU'
8490
ob_sdl_apiscan_symbolsFolder: '$(build.SourcesDirectory)\BuildOutput\Release\AnyCPU;SRV*http://symweb'
8591
steps:
@@ -122,7 +128,10 @@ stages:
122128
ob_sdl_suppression_suppressionFile: $(Build.SourcesDirectory)\dev\MRTCore\.gdn\mrt.gdnsuppress # This value is set on the job cdpx_engine, it will override the global gdnsuppress for this job
123129
ob_sdl_suppression_suppressionSet: default
124130
ob_artifactBaseName: "MrtBinaries_$(buildConfiguration)_$(buildPlatform)"
125-
ob_sdl_apiscan_enabled: true
131+
${{ if parameters.runStaticAnalysis }}:
132+
ob_sdl_apiscan_enabled: true
133+
${{ if not( parameters.runStaticAnalysis ) }}:
134+
ob_sdl_apiscan_enabled: false
126135
ob_sdl_apiscan_softwareFolder: '$(build.SourcesDirectory)\APIScanTarget'
127136
ob_sdl_apiscan_symbolsFolder: '$(build.SourcesDirectory)\APIScanTarget;SRV*http://symweb'
128137
steps:

0 commit comments

Comments
 (0)