mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Feature/acs 2129 setup agent (#781)
* ACS-2129 Setup agent scanning * ACS-2129 Run agent scanning only for master and release branches * ACS-2129 Fix source_clear.sh
This commit is contained in:
26
scripts/travis/source_clear.sh
Executable file
26
scripts/travis/source_clear.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "=========================== Starting SourceClear Script ==========================="
|
||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||
set +e -v -x
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
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
|
||||
|
||||
if [ -z "$VERACODE_FAILS_BUILD" ] || [ "$VERACODE_FAILS_BUILD" = false ] ; then
|
||||
SUCCESS=0
|
||||
fi
|
||||
|
||||
cat scan.log | grep -e 'Full Report Details' -e 'Failed'
|
||||
|
||||
popd
|
||||
set +vex
|
||||
echo "=========================== Finishing SourceClear Script =========================="
|
||||
|
||||
exit ${SUCCESS}
|
Reference in New Issue
Block a user