-
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (56 loc) · 2.02 KB
/
github-action.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
name: Whitesource Prioritize Java with Maven
on:
push:
branches: [ develop ]
pull_request:
branches: [ release* ]
jobs:
install-notest:
runs-on: ubuntu-latest
name: "Package and linting"
steps:
- uses: actions/checkout@v2
- name: set up JDK 16
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 16
architecture: x64
- name: Cache Maven packages
uses: actions/[email protected]
with:
path: ~/.m2
key: ubuntu-latest-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ubuntu-latest-m2
- name: Test with Maven
run: mvn install -DskipTests
- name: WhiteSource Unified Agent Scan
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
WS_APIKEY: ${{secrets.APIKEY}}
WS_USERKEY: ${{secrets.USERKEY}}
run: |
cat <<EOF > eua.config
apiKey=$WS_APIKEY
userKey=$WS_USERKEY
wss.url=https://saas.whitesourcesoftware.com/agent
productName=GH_${{ github.event.repository.name }}
projectName=${{ github.ref }}_Prioritize
enableImpactAnalysis=true
requireKnownSha1=false
resolveAllDependencies=false
maven.resolveDependencies=true
maven.aggregateModules=true
fileSystemScan=false
generateProjectDetailsJson=true
includes=**/*.jar
EOF
cat eua.config
echo config created successfully
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
curl -LJO https://unified-agent.s3.amazonaws.com/xModuleAnalyzer/xModuleAnalyzer.jar
echo Unified Agent downloaded successfully
java -jar wss-unified-agent.jar -d ./ -analyzeMultiModule 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