From 4c84445df5c8ba4034193edc5ab7e2d26cf2ee74 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Fri, 22 Sep 2023 13:54:30 -0700 Subject: [PATCH] add email notifications for stable --- scripts/produce-8-full.sh | 27 +++++++++++++++++++++++++++ scripts/updates-8-devel.sh | 10 ++++++++++ scripts/updates-8-extras.sh | 11 +++++++++++ scripts/updates-8-full.sh | 27 +++++++++++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100755 scripts/produce-8-full.sh create mode 100755 scripts/updates-8-full.sh diff --git a/scripts/produce-8-full.sh b/scripts/produce-8-full.sh new file mode 100755 index 0000000..3abfb44 --- /dev/null +++ b/scripts/produce-8-full.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +source "$(dirname "$0")/common-8" +export PATH=/usr/sbin:/usr/bin:/root/bin +bash produce-8.sh + +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + exit 1 +fi +unset ret_val + +bash updates-8-devel.sh + +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + exit 1 +fi +unset ret_val + +bash updates-8-extras.sh + +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + exit 1 +fi +unset ret_val diff --git a/scripts/updates-8-devel.sh b/scripts/updates-8-devel.sh index f3c21f0..93767cc 100755 --- a/scripts/updates-8-devel.sh +++ b/scripts/updates-8-devel.sh @@ -22,6 +22,16 @@ fi time $CMD ret_val=$? +if [[ "$ret_val" != "0" ]]; then + if [[ "$MAILNOTIF" == "yes" ]]; then + echo "This is a notification that a recent stable $SHORT compose failed on $(hostname)" | mutt -e "set from=\"$FROM\"" \ + -e 'set envelope_from=yes' \ + -s "Compose $NEWCOMPOSE_ID failed (for Rocky Linux $REVISION)" \ + releng@rockylinux.org + fi + exit 1 +fi + if [ "$ret_val" -eq 0 ]; then pushd "${TARGET_DIR}/latest-Rocky-$SHORT-8/compose/$SHORT" || { echo "Could not switch."; exit 1; } if [ -d "i386" ]; then diff --git a/scripts/updates-8-extras.sh b/scripts/updates-8-extras.sh index 8a24f7e..39e0783 100755 --- a/scripts/updates-8-extras.sh +++ b/scripts/updates-8-extras.sh @@ -17,3 +17,14 @@ else fi time $CMD +ret_val=$? + +if [[ "$ret_val" != "0" ]]; then + if [[ "$MAILNOTIF" == "yes" ]]; then + echo "This is a notification that a recent stable $SHORT compose failed on $(hostname)" | mutt -e "set from=\"$FROM\"" \ + -e 'set envelope_from=yes' \ + -s "Compose $NEWCOMPOSE_ID failed (for Rocky Linux $REVISION)" \ + releng@rockylinux.org + fi + exit 1 +fi diff --git a/scripts/updates-8-full.sh b/scripts/updates-8-full.sh new file mode 100755 index 0000000..d0d5dae --- /dev/null +++ b/scripts/updates-8-full.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +source "$(dirname "$0")/common-8" +export PATH=/usr/sbin:/usr/bin:/root/bin +bash updates-8.sh + +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + exit 1 +fi +unset ret_val + +bash updates-8-devel.sh + +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + exit 1 +fi +unset ret_val + +bash updates-8-extras.sh + +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + exit 1 +fi +unset ret_val