Fail on errors

This commit is contained in:
Jonatan Castro 2020-11-26 17:48:33 +11:00
parent 9882f230b4
commit cbd0e81210

View File

@ -9,14 +9,14 @@ jobs:
- run:
name: Check SSL Certificates
command: |
DATE=`date "+%Y%m%d-%H%M"`
set -e
sudo pip install -r requirements.txt
OUTPUT=$(./ssl_checker.py -f ./hosts_to_check)
echo "$OUTPUT"
if ! [[echo "$OUTPUT" | grep "Warning: 0"]]; then
if ! [[ echo "$OUTPUT" | grep "Warning: 0" ]]; then
.circleci/slack-message.sh "*Checked SSL Certificates*: Warnings :warning:" "MASTER" $DATE "#FFFF00"
fi
if ! [[echo "$OUTPUT" | grep "Expired: 0"]]; then
if ! [[ echo "$OUTPUT" | grep "Expired: 0" ]]; then
.circleci/slack-message.sh "*Checked SSL Certificates*: Expired :x:" "MASTER" $DATE "#FF0000"
fi
.circleci/slack-message.sh "*Checked SSL Certificates*: Success :key:" "MASTER" $DATE "#008000"