-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
76 lines (68 loc) · 2.09 KB
/
azure-pipelines.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#
# This is an example of using VeraDemo Java test application with the Veracode Static scanner.
#
# A Veracode subscription is required.
trigger:
- none
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: Build
jobs:
- job: doBuild
steps:
- task: Maven@3
displayName: Build with Maven
inputs:
mavenPomFile: 'app/pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'package'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'app/target/verademo.war'
ArtifactName: 'upload'
- stage: PolicyScan
jobs:
- job: doStaticScan
steps:
#debugging step
# - script: |
# echo buildNumber: $(build.buildNumber)
# echo binDir: $(build.binariesDirectory)
# echo artDir: $(build.artifactstagingdirectory)
# echo srcDir: $(build.sourcesDirectory)
- task: DownloadBuildArtifacts@1
inputs:
artifactName: upload
- task: Veracode@3
inputs:
ConnectionDetailsSelection: 'Credentials'
apiId: $(VERACODE_API_ID)
apiKey: $(VERACODE_API_KEY)
veracodeAppProfile: 'Verademo'
version: 'Azure-$(build.buildNumber)'
filepath: '$(build.artifactstagingdirectory)/upload/verademo.war'
# the above steps are the bare minimum.
# below are some additional steps that are commonplace
- stage: SCAScan
jobs:
- job: doSCAScan
steps:
- script: |
curl -sSL https://download.sourceclear.com/ci.sh | sh -s -- scan app
env:
SRCCLR_API_TOKEN: $(SRCCLR_TOKEN)
- stage: ContainerScan
jobs:
- job: doContainerScan
steps:
- script: |
curl -fsS https://tools.veracode.com/veracode-cli/install | sh
./veracode scan --type directory --source . --format table
env:
VERACODE_API_KEY_ID: $(VERACODE_API_ID)
VERACODE_API_KEY_SECRET: $(VERACODE_API_KEY)