Skip to content

Commit a2d763f

Browse files
authored
Enable binskim to extract packages (#6989)
* Enable binskim to extract packages * Try enabling template publishing * Don't publish all of artifacts Previously I set the pipeline to publish all artifacts, which was way too much, since that contained referenced binaries, tests, etc. Instead we need to publish only what we build and ship from this repo. That way we only run validation on those shipping packages. * Fix packages path
1 parent a369be9 commit a2d763f

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

azure-pipelines.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ variables:
7575
- name: Build.Arcade.VSIXOutputPath
7676
value: $(Build.Arcade.ArtifactsPath)VSIX
7777

78+
# Enable extraction of published outputs for analysis
79+
- name: GDN_EXTRACT_TOOLS
80+
value: 'binskim,bandit,roslynanalyzers'
81+
82+
- name: GDN_EXTRACT_FILTER
83+
value: 'f|**/*.zip;f|**/*.nupkg;f|**/*.vsix;f|**/*.cspkg;f|**/*.sfpkg;f|**/*.package'
84+
7885
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/validation/'), eq(variables['Build.Reason'], 'Manual')) }}:
7986
- name: PostBuildSign
8087
value: false
@@ -133,6 +140,8 @@ resources:
133140
extends:
134141
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
135142
parameters:
143+
featureFlags:
144+
binskimScanAllExtensions: true
136145
sdl:
137146
policheck:
138147
enabled: true
@@ -154,18 +163,19 @@ extends:
154163
jobs:
155164
- template: /eng/common/templates-official/jobs/jobs.yml@self
156165
parameters:
166+
artifacts:
167+
publish:
168+
logs: true
169+
manifests: true
157170
enableMicrobuild: true
158171
enableTelemetry: true
159172
enableSourceIndex: ${{ variables['enableSourceIndex'] }}
160173
runAsPublic: ${{ variables['runAsPublic'] }}
161-
# Publish build logs
162-
enablePublishBuildArtifacts: true
163174
# Publish test logs
164175
enablePublishTestResults: true
165176
# Publish NuGet packages using v3
166177
# https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md#basic-onboarding-scenario-for-new-repositories-to-the-current-publishing-version-v3
167178
enablePublishUsingPipelines: true
168-
enablePublishBuildAssets: true
169179
workspace:
170180
clean: all
171181

@@ -189,9 +199,16 @@ extends:
189199
outputs:
190200
- output: pipelineArtifact
191201
displayName: 'Publish Azure DevOps extension artifacts'
192-
condition: succeeded()
193202
targetPath: '$(Build.Arcade.VSIXOutputPath)'
194203
artifactName: 'VSIXArtifacts'
204+
condition: always()
205+
continueOnError: true
206+
- output: pipelineArtifact
207+
displayName: 'Publish Packages'
208+
targetPath: '$(Build.Arcade.ArtifactsPath)packages'
209+
artifactName: 'PackageArtifacts_Windows'
210+
condition: always()
211+
continueOnError: true
195212

196213
preSteps:
197214
- checkout: self

0 commit comments

Comments
 (0)