Skip to content

Commit

Permalink
update mend yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmars committed Jan 18, 2025
1 parent 1cdc58b commit b717c19
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/mend-scan.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Reference: https://github.com/mend-toolkit/mend-examples/blob/main/Unified%20Agent/CI-CD/GitHub.yml

name: Mend Unified Agent Release Scan
on:
on:
workflow_dispatch:
push:
branches:
- 'master'
branches:
- 'master'
schedule:
- cron: '0 0 * * 1'
jobs:
mendscan:
env:
Expand All @@ -15,40 +17,38 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
# - name: Build with Gradle
# run: ./gradlew -Prelease.useLastTag=false clean build
- name: Mend Unified Agent Scan
env:
WS_PRODUCTNAME: ${{vars.MEND_PRODUCT_NAME}}
WS_PROJECTNAME: ${{github.event.repository.name}}_${{github.ref_name}}
WS_GENERATEPROJECTDETAILSJSON: true
WS_GRADLE_ADDITIONALARGUMENTS: -Prelease.useLastTag=false
run: |
echo Downloading Mend Unified Agent
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
echo "Integrity Check Failed"
else
echo "Integrity Check Passed"
echo Starting Unified Agent Scan
java -jar wss-unified-agent.jar
fi
- name: 'Upload WhiteSource folder'
uses: actions/upload-artifact@v2
with:
name: Mend
path: whitesource
retention-days: 14
- name: 'Upload Mend folder if failure'
uses: actions/upload-artifact@v2
if: failure()
with:
name: Mend
path: whitesource
retention-days: 14
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Mend Unified Agent Scan
env:
WS_PRODUCTNAME: ${{vars.MEND_PRODUCT_NAME}}
WS_PROJECTNAME: ${{github.event.repository.name}}_${{github.ref_name}}
WS_GENERATEPROJECTDETAILSJSON: true
WS_GRADLE_ADDITIONALARGUMENTS: -Prelease.useLastTag=false
run: |
echo Downloading Mend Unified Agent
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
echo "Integrity Check Failed"
else
echo "Integrity Check Passed"
echo Starting Unified Agent Scan
java -jar wss-unified-agent.jar
fi
- name: 'Upload WhiteSource folder'
uses: actions/upload-artifact@v4
with:
name: Mend
path: whitesource
retention-days: 14
- name: 'Upload Mend folder if failure'
uses: actions/upload-artifact@v4
if: failure()
with:
name: Mend
path: whitesource
retention-days: 14

0 comments on commit b717c19

Please sign in to comment.