#!/bin/sh # # Combine CVE reports for rzn1 and soca9 # set -e # # Did the build succeed? Check for logfiles: # axis-MACHINE: rzn1d, soca9 # files: cve-rzn1-snarc.txt, cve-snarc-soca9.txt # if ! test \ -e $JENKINS_HOME/jobs/$JOB_NAME/configurations/axis-DISTRO/dip/axis-MACHINE/rzn1d/axis-label/docker-buster-amd64/builds/$BUILD_NUMBER/archive/cve-rzn1-snarc.txt -a \ -e $JENKINS_HOME/jobs/$JOB_NAME/configurations/axis-DISTRO/dip/axis-MACHINE/soca9/axis-label/docker-buster-amd64/builds/$BUILD_NUMBER/archive/cve-snarc-soca9.txt then echo '

Build failed, no CVE check done

' > cve.html echo 'Build failed, no CVE check done' > cve.sum exit fi # # Combine the reports using sort/uniq. # Note the wildcard for MACHINE (rzn1/soca9). # ARCHIVE="$JENKINS_HOME/jobs/$JOB_NAME/configurations/axis-DISTRO/dip/axis-MACHINE/*/axis-label/docker-buster-amd64/builds/$BUILD_NUMBER/archive" sort -uV $ARCHIVE/cve-*.txt > cve.txt sort -uV $ARCHIVE/base-cve-*.txt > base-cve.txt # # Detailed report in HTML format. Will be attached to email. # Perl helper converts tab-delimited text to nested