added script for Veracode Agent-Based Scan Software Composition Analysis

This commit is contained in:
Claudia Agache
2020-08-18 16:39:16 +03:00
parent 140ee10d05
commit 4cbec1b256
2 changed files with 16 additions and 2 deletions

15
scripts/source_clear.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# fail script immediately on any errors in external commands and print the lines
set -ev
mvn -B -q clean install \
-DskipTests \
-Dmaven.javadoc.skip=true \
com.srcclr:srcclr-maven-plugin:scan \
-Dcom.srcclr.apiToken=$SRCCLR_API_TOKEN > scan.log
SUCCESS=$? # this will read exit code of the previous command
cat scan.log | grep -e 'Full Report Details' -e 'Failed'
exit ${SUCCESS}