mirror of
https://git.rockylinux.org/rocky/pungi-rocky.git
synced 2024-11-22 12:51:27 +00:00
add mail notifications
This commit is contained in:
parent
545d4b15e7
commit
0967cfd68e
@ -1,50 +0,0 @@
|
|||||||
image_build = {
|
|
||||||
"^BaseOS$": [
|
|
||||||
{
|
|
||||||
"image-build": {
|
|
||||||
"format": [("qcow2", "qcow2")],
|
|
||||||
"name": "Rocky-8-GenericCloud",
|
|
||||||
"subvariant": "generic",
|
|
||||||
"version": "8.8",
|
|
||||||
"release": "!RELEASE_FROM_DATE_RESPIN"
|
|
||||||
"target": "image-rocky-8",
|
|
||||||
"ksurl": "git+https://git.rockylinux.org/rocky/kickstarts.git?#origin/r8",
|
|
||||||
"kickstart": "Rocky-8-GenericCloud-Base.ks",
|
|
||||||
"ksversion": "F26",
|
|
||||||
"distro": "Fedora-20",
|
|
||||||
"disk-size": "10",
|
|
||||||
"arches": ["x86_64","aarch64"],
|
|
||||||
"install_tree_from": "BaseOS",
|
|
||||||
"repo": ["BaseOS","AppStream",]
|
|
||||||
},
|
|
||||||
"factory-parameters": {
|
|
||||||
"generate_icicle": False,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"image-build": {
|
|
||||||
"format": [("raw.xz", "raw.xz")],
|
|
||||||
"name": "Rocky-8-ec2",
|
|
||||||
"subvariant": "ec2",
|
|
||||||
"version": "8.8",
|
|
||||||
"release": "!RELEASE_FROM_DATE_RESPIN"
|
|
||||||
"target": "image-rocky-8",
|
|
||||||
"ksurl": "git+https://git.rockylinux.org/rocky/kickstarts.git?#origin/r8",
|
|
||||||
"kickstart": "Rocky-8-EC2-Base.ks",
|
|
||||||
"ksversion": "F26",
|
|
||||||
"distro": "Fedora-20",
|
|
||||||
"disk-size": "10",
|
|
||||||
"arches": ["x86_64", "aarch64"],
|
|
||||||
"install_tree_from": "BaseOS",
|
|
||||||
"repo": ["BaseOS","AppStream",]
|
|
||||||
},
|
|
||||||
"factory-parameters": {
|
|
||||||
"generate_icicle": False,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
translate_paths = [
|
|
||||||
("/mnt/koji", "https://koji.rockylinux.org/kojifiles"),
|
|
||||||
]
|
|
@ -1,13 +1,59 @@
|
|||||||
global_ksurl = 'git+https://git.resf.org/sig_core/kickstarts.git?#origin/r8'
|
#global_ksurl = 'git+https://git.resf.org/sig_core/kickstarts.git?#origin/r8'
|
||||||
live_media = {
|
#live_media = {
|
||||||
'^Workstation$': [
|
# '^Workstation$': [
|
||||||
|
# {
|
||||||
|
# 'name': 'Rocky-Workstation-8',
|
||||||
|
# 'version': '8.8',
|
||||||
|
# 'arches': ['x86_64'],
|
||||||
|
# 'kickstart': 'Rocky-8-Workstation.ks',
|
||||||
|
# 'repo': ['BaseOS', 'AppStream', 'PowerTools', 'extras'],
|
||||||
|
# 'failable': ['*']
|
||||||
|
# }
|
||||||
|
# ]
|
||||||
|
#}
|
||||||
|
image_build = {
|
||||||
|
"^BaseOS$": [
|
||||||
{
|
{
|
||||||
'name': 'Rocky-Workstation-8',
|
"image-build": {
|
||||||
'version': '8.8',
|
"format": [("qcow2", "qcow2")],
|
||||||
'arches': ['x86_64'],
|
"name": "Rocky-8-GenericCloud",
|
||||||
'kickstart': 'Rocky-8-Workstation.ks',
|
"subvariant": "generic",
|
||||||
'repo': ['BaseOS', 'AppStream', 'PowerTools', 'extras'],
|
"version": "8.8",
|
||||||
'failable': ['*']
|
"release": "!RELEASE_FROM_DATE_RESPIN"
|
||||||
|
"target": "image-rocky-8",
|
||||||
|
"ksurl": "git+https://git.resf.org/sig_core/kickstarts.git?#origin/r8",
|
||||||
|
"kickstart": "Rocky-8-GenericCloud-Base.ks",
|
||||||
|
"ksversion": "F26",
|
||||||
|
"distro": "Fedora-20",
|
||||||
|
"disk-size": "10",
|
||||||
|
"arches": ["x86_64","aarch64"],
|
||||||
|
"install_tree_from": "BaseOS",
|
||||||
|
"repo": ["BaseOS","AppStream",]
|
||||||
|
},
|
||||||
|
"factory-parameters": {
|
||||||
|
"generate_icicle": False,
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image-build": {
|
||||||
|
"format": [("raw.xz", "raw.xz")],
|
||||||
|
"name": "Rocky-8-EC2",
|
||||||
|
"subvariant": "ec2",
|
||||||
|
"version": "8.8",
|
||||||
|
"release": "!RELEASE_FROM_DATE_RESPIN"
|
||||||
|
"target": "image-rocky-8",
|
||||||
|
"ksurl": "git+https://git.resf.org/sig_core/kickstarts.git?#origin/r8",
|
||||||
|
"kickstart": "Rocky-8-EC2-Base.ks",
|
||||||
|
"ksversion": "F26",
|
||||||
|
"distro": "Fedora-20",
|
||||||
|
"disk-size": "10",
|
||||||
|
"arches": ["x86_64", "aarch64"],
|
||||||
|
"install_tree_from": "BaseOS",
|
||||||
|
"repo": ["BaseOS","AppStream",]
|
||||||
|
},
|
||||||
|
"factory-parameters": {
|
||||||
|
"generate_icicle": False,
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# Overrides default variables
|
# Overrides default variables
|
||||||
|
|
||||||
|
from images import *
|
||||||
|
|
||||||
sigkeys = ['6D745A60']
|
sigkeys = ['6D745A60']
|
||||||
tree_arches = ['aarch64', 'i386', 'x86_64']
|
tree_arches = ['aarch64', 'i386', 'x86_64']
|
||||||
translate_paths = [
|
translate_paths = [
|
||||||
|
@ -1 +1,28 @@
|
|||||||
|
MAJOR="8"
|
||||||
REVISION="8.8"
|
REVISION="8.8"
|
||||||
|
FROMMAIL="Compose Tracker <releng@rockylinux.org>"
|
||||||
|
TOMAIL="releng@rockylinux.org"
|
||||||
|
|
||||||
|
if ! which mm-compose-notif > /dev/null 2>&1; then
|
||||||
|
MM_NOTIF=""
|
||||||
|
else
|
||||||
|
MM_NOTIF="$(which mm-compose-notif)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! which compose-changelog > /dev/null 2>&1; then
|
||||||
|
if [ -f "/home/$(whoami)/.local/bin/compose-changelog" ]; then
|
||||||
|
CHANGELOG_CMD="/home/$(whoami)/.local/bin/compose-changelog"
|
||||||
|
else
|
||||||
|
CHANGELOG_CMD=""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
CHANGELOG_CMD="$(which compose-changelog)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! which mutt > /dev/null 2>&1; then
|
||||||
|
MAILCMD=""
|
||||||
|
MAILNOTIF="no"
|
||||||
|
else
|
||||||
|
MAILCMD="$(which mutt)"
|
||||||
|
MAILNOTIF="yes"
|
||||||
|
fi
|
||||||
|
@ -3,16 +3,14 @@
|
|||||||
source "$(dirname "$0")/common-8"
|
source "$(dirname "$0")/common-8"
|
||||||
export PATH=/usr/sbin:/usr/bin:/root/bin
|
export PATH=/usr/sbin:/usr/bin:/root/bin
|
||||||
TARGET_DIR="/mnt/compose/8-LookAhead"
|
TARGET_DIR="/mnt/compose/8-LookAhead"
|
||||||
|
LOG_DIR="/mnt/compose/logs"
|
||||||
SHORT=Rocky
|
SHORT=Rocky
|
||||||
CONFIG=/etc/pungi-lh/rockylh.conf
|
CONFIG=/etc/pungi-lh/rockylh.conf
|
||||||
# Unused for now
|
OLDCOMPOSE_ID="$(cat $TARGET_DIR/latest-$SHORT-$MAJOR/COMPOSE_ID)"
|
||||||
OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-8/COMPOSE_ID)
|
|
||||||
SKIP=""
|
SKIP=""
|
||||||
#LABEL="--nightly --label RC-${REVISION}"
|
#LABEL="--nightly --label RC-${REVISION}"
|
||||||
LABEL="--test"
|
LABEL="--test"
|
||||||
|
|
||||||
CMD="pungi-koji --config=$CONFIG $SKIP $LABEL"
|
CMD="pungi-koji --config=$CONFIG $SKIP $LABEL"
|
||||||
#COMPOSE_ID="Rocky-8-20210625.n.0"
|
|
||||||
|
|
||||||
if [ -z "$COMPOSE_ID" ]; then
|
if [ -z "$COMPOSE_ID" ]; then
|
||||||
CMD="$CMD --target-dir=$TARGET_DIR"
|
CMD="$CMD --target-dir=$TARGET_DIR"
|
||||||
@ -21,3 +19,31 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
time $CMD
|
time $CMD
|
||||||
|
ret_val=$?
|
||||||
|
|
||||||
|
if [[ "$ret_val" != "0" ]]; then
|
||||||
|
if [[ "$MAILNOTIF" == "yes" ]]; then
|
||||||
|
echo "This is a notification that a recent $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
|
||||||
|
|
||||||
|
NEWCOMPOSE_ID="$(cat $TARGET_DIR/latest-$SHORT-$MAJOR/COMPOSE_ID)"
|
||||||
|
SHORTCOMPOSE_ID="$(echo $NEWCOMPOSE_ID | sed -e 's|Rocky-.*-||g')"
|
||||||
|
|
||||||
|
# attempt to check changelog
|
||||||
|
if [ -n "$CHANGELOG_CMD" ]; then
|
||||||
|
if ! $CHANGELOG_CMD -p "$LOG_DIR/" "$TARGET_DIR/$OLDCOMPOSE_ID/" "$TARGET_DIR/$NEWCOMPOSE_ID" 2>"$LOG_DIR/changelog.$SHORTCOMPOSE_ID.stderr"; then
|
||||||
|
if [[ "$MAILNOTIF" == "yes" ]]; then
|
||||||
|
mutt -e "set from=\"$FROM\"" \
|
||||||
|
-e 'set envelope_from=yes' \
|
||||||
|
-s "Changelog for $NEWCOMPOSE_ID failed" \
|
||||||
|
releng@rockylinux.org < "$LOG_DIR/changelog.$SHORTCOMPOSE_ID.stderr"
|
||||||
|
else
|
||||||
|
echo "!! Changelog run failed !!"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user