-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathcop-cache.yml
36 lines (36 loc) · 1.33 KB
/
cop-cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# example pipeline for Polaris scans using the Coverity on Polaris extension
# https://marketplace.visualstudio.com/items?itemName=blackduck.blackduck-coverity-on-polaris
# demonstrate POLARIS_HOME caching on ephemeral build agents
pool:
vmImage: ubuntu-latest
steps:
# designate POLARIS_HOME as something to cache, for more details see:
# https://learn.microsoft.com/en-us/azure/devops/pipelines/release/caching
- task: Cache@2
displayName: 'Cache POLARIS_HOME'
inputs:
key: 'POLARIS_HOME | "$(Agent.OS)"'
path: $(Agent.ToolsDirectory)/.blackduck/polaris
cacheHitVar: 'POLARIS_HOME_CACHEHIT'
- task: BlackduckCoverityOnPolaris@2
displayName: 'Coverity on Polaris Scan'
inputs:
polarisService: sipse.polaris.synopsys.com
polarisCommand: '--co project.name=chuckaude-$(Build.Repository.Name) analyze -w'
- task: CopyFiles@2
displayName: 'Copy Log Files'
condition: succeededOrFailed()
enabled: false
inputs:
Contents: |
.blackduck/polaris/configuration/resolved-polaris.yml
.blackduck/polaris/data/coverity/*/idir/build-log.txt
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Log Files'
condition: succeededOrFailed()
enabled: false
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'logs'