forked from att/Resiliency-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# replace .war with .jar or .ear if needed | ||
name: Whitesource Prioritize Java with Maven | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8' | ||
distribution: 'adopt' | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Build with Maven | ||
run: mvn clean install -DskipTests=true | ||
- name: WhiteSource Unified Agent Scan | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
WS_APIKEY: ${{secrets.APIKEY}} | ||
WS_USERKEY: ${{secrets.USERKEY}} | ||
WS_WSS_URL: https://saas.whitesourcesoftware.com/agent | ||
WS_PRODUCTNAME: GH_${{github.event.repository.name}} | ||
WS_PROJECTNAME: ${{github.ref}}_Prioritize | ||
WS_ENABLEIMPACTANALYSIS: true | ||
WS_REQUIREKNOWNSHA1: false | ||
WS_RESOLVEALLDEPENDENCIES: false | ||
WS_MAVEN_RESOLVEDEPENDENCIES: true | ||
WS_MAVEN_AGGREGATEMODULES: true | ||
WS_FILESYSTEMSCAN: false | ||
WS_GENERATEPROJECTDETAILSJSON: true | ||
run: | | ||
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar | ||
echo Unified Agent downloaded successfully | ||
WARFILE=$(find ./ -type f -wholename "*/target/*.jar") | ||
echo $WARFILE will be added to appPath | ||
java -jar wss-unified-agent.jar -appPath $WARFILE -d ./ | ||