5 wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
6 dpkg -i google-chrome-stable_current_amd64.deb || true
9 google-chrome --headless --disable-gpu -dump-dom --no-sandbox https://scan.coverity.com/projects/fd-io-vpp > $FILE
11 grep -i '<dt>Newly detected</dt>' $FILE || exit 42
13 NEW=$(grep -i -B 1 '<dt>Newly detected</dt>' $FILE | grep -Eo '[0-9]{1,4}')
14 ELIM=$(grep -i -B 1 '<dt>Eliminated</dt>' $FILE | grep -Eo '[0-9]{1,4}')
15 OUT=$(grep -i -B 1 '<dt>Outstanding</dt>' $FILE | grep -Eo '[0-9]{1,4}')
20 if [ "${OUT}" == "0" ]; then
21 echo 'Current outstanding issues are zero' > $OUTPUT
22 echo "Newly detected: $NEW" >> $OUTPUT
23 echo "Eliminated: $ELIM" >> $OUTPUT
24 echo "More details can be found at https://scan.coverity.com/projects/fd-io-vpp/view_defects" >> $OUTPUT
26 echo "Current number of outstanding issues are $OUT Failing job"
27 echo "Current number of outstanding issues are $OUT" > $OUTPUT
28 echo "Newly detected: $NEW" >> $OUTPUT
29 echo "Eliminated: $ELIM" >> $OUTPUT
30 echo "More details can be found at https://scan.coverity.com/projects/fd-io-vpp/view_defects" >> $OUTPUT