-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathApiWrapperScan.yml
More file actions
48 lines (40 loc) · 1.35 KB
/
Copy pathApiWrapperScan.yml
File metadata and controls
48 lines (40 loc) · 1.35 KB
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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: ubuntu-latest
steps:
- task: CmdLine@2
name: DownloadScanner
inputs:
script: |
curl https://repo1.maven.org/maven2/com/veracode/vosp/api/wrappers/vosp-api-wrappers-java/22.1.9.3/vosp-api-wrappers-java-22.1.9.3-dist.zip -o api-wrapper.zip
chmod 777 api-wrapper.zip
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '**/*.zip'
destinationFolder: ./destination
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'package'
- task: CmdLine@2
name: UploadAndScan
env:
VID: $(VERACODE_ID)
VKEY: $(VERACODE_KEY)
inputs:
script: java -jar ./destination/VeracodeJavaAPI.jar -appname "Verademo ADO" -vid "${VID}" -vkey "${VKEY}" -action uploadandscan -createprofile false -filepath "./target/verademo.war" -version "$(build.buildNumber)" -outputfilepath "uploadAndScanResult.xml"
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: 'uploadAndScanResult.xml'
artifactName: report