From 0e3727d6377dd55ff763a1a6ed0e3f64c441d922 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Tue, 17 Dec 2024 15:52:41 -0700 Subject: [PATCH] add cron jobs --- cron/beta-8 | 23 ++++++++++++++++++++++ cron/lookahead-8 | 22 +++++++++++++++++++++ cron/stable-updates-8 | 35 ++++++++++++++++++++++++++++++++++ cron/stable-updates-no-devel-8 | 34 +++++++++++++++++++++++++++++++++ cron/stable-updates-no-push-8 | 18 +++++++++++++++++ 5 files changed, 132 insertions(+) create mode 100644 cron/beta-8 create mode 100644 cron/lookahead-8 create mode 100644 cron/stable-updates-8 create mode 100644 cron/stable-updates-no-devel-8 create mode 100644 cron/stable-updates-no-push-8 diff --git a/cron/beta-8 b/cron/beta-8 new file mode 100644 index 0000000..95c5d25 --- /dev/null +++ b/cron/beta-8 @@ -0,0 +1,23 @@ +#!/bin/bash +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin +FROMMAIL="Compose Tracker " +rm -rf /etc/pungi-beta +git clone https://git.rockylinux.org/rocky/pungi-rocky.git -b r8-beta /etc/pungi-beta +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + echo "Git pull failed for beta pungi config" | mutt -e "set from=\"$FROM\"" \ + -e 'set envelope_from=yes' \ + -s "Git pull on /etc/pungi-beta failed" \ + releng@rockylinux.org + exit 1 +fi +pushd /etc/pungi-beta/scripts +bash produce-8-beta-full.sh +ret_val=$? +popd + +if [ "$ret_val" -eq 0 ]; then + pushd /root/sync-devel/sync + RLVER=8 bash beta-release-sync-to-staging.sh + popd +fi diff --git a/cron/lookahead-8 b/cron/lookahead-8 new file mode 100644 index 0000000..0b434b9 --- /dev/null +++ b/cron/lookahead-8 @@ -0,0 +1,22 @@ +#!/bin/bash +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin +FROMMAIL="Compose Tracker " +pushd /etc/pungi-lh/scripts +git pull +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + echo "Git pull failed for LookAhead pungi config" | mutt -e "set from=\"$FROM\"" \ + -e 'set envelope_from=yes' \ + -s "Git pull on /etc/pungi-lh failed" \ + releng@rockylinux.org + exit 1 +fi +bash produce-8-lookahead-full.sh +ret_val=$? +popd + +if [ "$ret_val" -eq 0 ]; then + pushd /root/sync-devel/sync + RLVER=8 bash lh-release-sync-to-staging.sh + popd +fi diff --git a/cron/stable-updates-8 b/cron/stable-updates-8 new file mode 100644 index 0000000..f5763f1 --- /dev/null +++ b/cron/stable-updates-8 @@ -0,0 +1,35 @@ +#!/bin/bash +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin +FROMMAIL="Compose Tracker " +rm -rf /etc/pungi-prod +git clone https://git.rockylinux.org/rocky/pungi-rocky.git -b r8 /etc/pungi-prod +rm -rf /mnt/compose/8_metadata +git clone https://git.rockylinux.org/rocky/rocky-module-metadata.git -b r8 /mnt/compose/8_metadata +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + echo "Git pull failed for prod pungi config" | mutt -e "set from=\"$FROM\"" \ + -e 'set envelope_from=yes' \ + -s "Git pull on /etc/pungi-prod failed" \ + releng@rockylinux.org + exit 1 +fi +pushd /etc/pungi-prod/scripts +bash updates-8-full.sh +ret_val=$? +popd + +if [ "$ret_val" -eq 0 ]; then + pushd /root/sync-devel/sync + RLVER=8 bash sync-to-staging.sh Rocky-devel + RLVER=8 bash sync-to-staging.sh Extras + RLVER=8 bash sync-to-staging.sh Rocky + popd + + pushd /mnt/repos-staging/mirror/pub/rocky/8.10 + python3.9 /usr/local/bin/apollo_tree -p $(pwd) -n 'Rocky Linux 8 $arch' -i Live -i Minimal -i devel -i extras -i images -i isos -i live -i metadata -i Devel -i plus -i nfv + popd + + pushd /root/sync-devel/sync + RLVER=8 bash sign-repos-only.sh + popd +fi diff --git a/cron/stable-updates-no-devel-8 b/cron/stable-updates-no-devel-8 new file mode 100644 index 0000000..7cec675 --- /dev/null +++ b/cron/stable-updates-no-devel-8 @@ -0,0 +1,34 @@ +#!/bin/bash +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin +FROMMAIL="Compose Tracker " +rm -rf /etc/pungi-prod +git clone https://git.rockylinux.org/rocky/pungi-rocky.git -b r8 /etc/pungi-prod +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + echo "Git pull failed for prod pungi config" | mutt -e "set from=\"$FROM\"" \ + -e 'set envelope_from=yes' \ + -s "Git pull on /etc/pungi-prod failed" \ + releng@rockylinux.org + exit 1 +fi +pushd /etc/pungi-prod/scripts +#bash updates-8-full.sh +bash updates-8.sh +ret_val=$? +popd + +if [ "$ret_val" -eq 0 ]; then + pushd /root/sync-devel/sync + #RLVER=8 bash sync-to-staging.sh Rocky-devel + #RLVER=8 bash sync-to-staging.sh Extras + RLVER=8 bash sync-to-staging.sh Rocky + popd + + pushd /mnt/repos-staging/mirror/pub/rocky/8.10 + python3.9 /usr/local/bin/apollo_tree -p $(pwd) -n 'Rocky Linux 8 $arch' -i Live -i Minimal -i devel -i extras -i images -i isos -i live -i metadata -i Devel -i plus -i nfv + popd + + pushd /root/sync-devel/sync + RLVER=8 bash sign-repos-only.sh + popd +fi diff --git a/cron/stable-updates-no-push-8 b/cron/stable-updates-no-push-8 new file mode 100644 index 0000000..182669c --- /dev/null +++ b/cron/stable-updates-no-push-8 @@ -0,0 +1,18 @@ +#!/bin/bash +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin +FROMMAIL="Compose Tracker " +rm -rf /etc/pungi-prod +git clone https://git.rockylinux.org/rocky/pungi-rocky.git -b r8 /etc/pungi-prod +ret_val=$? +if [ "$ret_val" -ne 0 ]; then + echo "Git pull failed for prod pungi config" | mutt -e "set from=\"$FROM\"" \ + -e 'set envelope_from=yes' \ + -s "Git pull on /etc/pungi-prod failed" \ + releng@rockylinux.org + exit 1 +fi +pushd /etc/pungi-prod/scripts +#bash updates-8-full.sh +bash updates-8.sh +ret_val=$? +popd