Skip to content

Instantly share code, notes, and snippets.

@SudeepParajuli
Created April 29, 2020 14:13
Show Gist options
  • Save SudeepParajuli/fa10ae89f36de31be8101a88a4a8225a to your computer and use it in GitHub Desktop.
Save SudeepParajuli/fa10ae89f36de31be8101a88a4a8225a to your computer and use it in GitHub Desktop.
JOB_NAME="master"
score_status=`cat $JENKINS_HOME/jobs/$JOB_NAME/builds/lastSuccessfulBuild/log | grep Score: | sed -n 2p | awk {'print $2'}`
echo "****"
echo $score_status
if [ $score_status -gt 4 ]
then
echo "security check passed"
else
echo "security check failed"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment