Skip to content

Commit 2f47300

Browse files
committed
Specifically made binskim only run for the Windows job.
1 parent 9991c7e commit 2f47300

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.vsts-ci-official.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,6 @@ extends:
6262
enableSourceBuild: true
6363
helixRepo: dotnet/command-line-api
6464
timeoutInMinutes: 180 # increase timeout since BAR publishing might wait a long time
65-
templateContext:
66-
sdl:
67-
binskim:
68-
analyzeTargetGlob: +:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;-:f|artifacts\bin\**\xunit*.dll;-:f|artifacts\bin\**\verify*.dll;
69-
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
70-
preSteps:
71-
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
72-
displayName: Create artifacts/bin directory
7365
jobs:
7466
- job: Windows
7567
pool:
@@ -111,8 +103,10 @@ extends:
111103
${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
112104
_SignType: real
113105
_BuildArgs: $(_OfficialBuildArgs)
114-
115106
templateContext:
107+
sdl:
108+
binskim:
109+
analyzeTargetGlob: +:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;-:f|artifacts\bin\**\xunit*.dll;-:f|artifacts\bin\**\verify*.dll;
116110
outputs:
117111
- output: pipelineArtifact
118112
displayName: Upload package artifacts
@@ -124,7 +118,10 @@ extends:
124118
condition: and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
125119
targetPath: '$(Build.SourcesDirectory)\artifacts\SymStore\$(_BuildConfig)'
126120
artifactName: 'NativeSymbols'
127-
121+
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
122+
preSteps:
123+
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
124+
displayName: Create artifacts/bin directory
128125
steps:
129126
- checkout: self
130127
clean: true

0 commit comments

Comments
 (0)