2 # SPDX-license-identifier: Apache-2.0
4 export PATH=$PATH:/usr/local/bin/
7 # This Log should always exist
8 if [[ -e securityaudit.log ]] ; then
9 echo -e "\nposting security audit report to gerrit...\n"
11 #check if log has errors
12 if grep ERROR securityaudit.log; then
16 cat securityaudit.log | awk -F"ERROR - " '{print $2}' | sed -e "s/\"/\\\\\"/g;s/\'/\\\\\'/g"> shortlog
18 ssh -p 29418 gerrit.opnfv.org \
19 "gerrit review -p $GERRIT_PROJECT \
20 -m \"$(cat shortlog)\" \
21 $GERRIT_PATCHSET_REVISION \