gosec.sh: make it clearer where the output goes
It was not trivial for me to find.
@@ -7,10 +7,17 @@ mkdir -p $ARTIFACTS
echo "Run go sec in pkg"
cd $KUBEVIRT_DIR/pkg
-ARGS="-sort -quiet -out=${ARTIFACTS}/junit-gosec.xml -exclude-dir=testutils -fmt=junit-xml ./..."
+OUT="${ARTIFACTS}/junit-gosec.xml"
+ARGS="-sort -quiet -out=$OUT -exclude-dir=testutils -fmt=junit-xml ./..."
if [ ! -z $GOSEC ]; then
echo "Running subset"
echo $GOSEC
ARGS="-include=$GOSEC $ARGS"
fi
-gosec $ARGS
+if gosec $ARGS; then
+ echo "no errors detected"
+ exit 0
+else
+ echo "report written to" $(echo "$OUT" | sed 's/.*_out/_out/')
+ exit 1
+fi
