File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ # Reference: https://github.com/mend-toolkit/mend-examples/blob/main/Unified%20Agent/CI-CD/GitHub.yml
2+
3+ name : Mend Unified Agent Release Scan
4+ on :
5+ workflow_dispatch :
6+ push :
7+ branches :
8+ - ' master'
9+ jobs :
10+ mendscan :
11+ env :
12+ WS_APIKEY : ${{secrets.MEND_APIKEY}}
13+ WS_USERKEY : ${{secrets.MEND_USERKEY}}
14+ WS_WSS_URL : ${{secrets.MEND_WS_WSS_URL}}
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v3
19+ - name : Set up JDK
20+ uses : actions/setup-java@v2
21+ with :
22+ java-version : ' 11'
23+ distribution : ' adopt'
24+ # - name: Build with Gradle
25+ # run: ./gradlew -Prelease.useLastTag=false clean build
26+ - name : Mend Unified Agent Scan
27+ env :
28+ WS_PRODUCTNAME : ${{vars.MEND_PRODUCT_NAME}}
29+ WS_PROJECTNAME : ${{github.event.repository.name}}_${{github.ref_name}}
30+ WS_GENERATEPROJECTDETAILSJSON : true
31+ WS_GRADLE_ADDITIONALARGUMENTS : -Prelease.useLastTag=false
32+ run : |
33+ echo Downloading Mend Unified Agent
34+ curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
35+ if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
36+ echo "Integrity Check Failed"
37+ else
38+ echo "Integrity Check Passed"
39+ echo Starting Unified Agent Scan
40+ java -jar wss-unified-agent.jar
41+ fi
42+ - name : ' Upload WhiteSource folder'
43+ uses : actions/upload-artifact@v2
44+ with :
45+ name : Mend
46+ path : whitesource
47+ retention-days : 14
48+ - name : ' Upload Mend folder if failure'
49+ uses : actions/upload-artifact@v2
50+ if : failure()
51+ with :
52+ name : Mend
53+ path : whitesource
54+ retention-days : 14
You can’t perform that action at this time.
0 commit comments