Change-Id: I090e601b45b58fae4235867536553570f2674f9a
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
set -o errexit
set -o pipefail
export PATH=$PATH:/usr/local/bin/
set -o errexit
set -o pipefail
export PATH=$PATH:/usr/local/bin/
# If no violations were found, no lint log will exist.
if [[ -e securityaudit.log ]] ; then
echo -e "\nposting security audit report to gerrit...\n"
# If no violations were found, no lint log will exist.
if [[ -e securityaudit.log ]] ; then
echo -e "\nposting security audit report to gerrit...\n"
- cat securityaudit.log | awk -F"ERROR\ \-\ " '{print $2}' > shortlog
+if grep ERROR securityaudit.log; then
+EXITSTATUS=1
+fi
+
+ cat securityaudit.log | awk -F"ERROR -\ " '{print $2}' > shortlog
ssh -p 29418 gerrit.opnfv.org \
"gerrit review -p $GERRIT_PROJECT \
ssh -p 29418 gerrit.opnfv.org \
"gerrit review -p $GERRIT_PROJECT \
$GERRIT_PATCHSET_REVISION \
--notify NONE"
$GERRIT_PATCHSET_REVISION \
--notify NONE"
echo "--------------------------------------------------------"
echo "Stopping docker container with ID $container_id"
docker stop $container_id
echo "--------------------------------------------------------"
echo "Stopping docker container with ID $container_id"
docker stop $container_id