-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines-1.yml
56 lines (49 loc) · 1.79 KB
/
azure-pipelines-1.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
# 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:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- script: |
echo Add other tasks to build, test, and deploy your project.
echo See https://aka.ms/yaml
displayName: 'Run a multi-line script'
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
goals: 'install'
publishJUnitResults: false
testResultsFiles: '**/surefire-reports/TEST-*.xml'
javaHomeOption: 'JDKVersion'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
effectivePomSkip: false
sonarQubeRunAnalysis: false
- script: |
cat <<EOF > eua.config
apiKey=
productName=PepsiPOC
projectName=WebGoat_2.0
enableImpactAnalysis=true
requireKnownSha1=false
resolveAllDependencies=false
maven.resolveDependencies=true
maven.aggregateModules=true
fileSystemScan=false
EOF
cat eua.config
echo config created successfully
curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
curl -o xModuleAnalyzer.jar https://unified-agent.s3.amazonaws.com/xModuleAnalyzer/xModuleAnalyzer-21.4.1.jar
echo UA downloaded successfully
java -jar wss-unified-agent.jar -d ./ -analyzeMultiModule multimodule.txt
sed -i 's/AppPath4=/AppPath4=\/webgoat-server\/target\/webgoat-server-v8.0.0.jar/1' multimodule.txt
echo 'multimodule.txt contents'
cat multimodule.txt
java -jar xModuleAnalyzer.jar -xModulePath multimodule.txt -fsaJarPath ./wss-unified-agent.jar -c ./eua.config -aggregateModules true
displayName: 'xModuleAnalyzer & UA download an run'