Skip to content

Commit

Permalink
add cron jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
nazunalika committed Dec 17, 2024
1 parent 02a8229 commit 0e3727d
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cron/beta-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
FROMMAIL="Compose Tracker <[email protected]>"
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" \
[email protected]
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
22 changes: 22 additions & 0 deletions cron/lookahead-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
FROMMAIL="Compose Tracker <[email protected]>"
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" \
[email protected]
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
35 changes: 35 additions & 0 deletions cron/stable-updates-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
FROMMAIL="Compose Tracker <[email protected]>"
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" \
[email protected]
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
34 changes: 34 additions & 0 deletions cron/stable-updates-no-devel-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
FROMMAIL="Compose Tracker <[email protected]>"
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" \
[email protected]
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
18 changes: 18 additions & 0 deletions cron/stable-updates-no-push-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
FROMMAIL="Compose Tracker <[email protected]>"
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" \
[email protected]
exit 1
fi
pushd /etc/pungi-prod/scripts
#bash updates-8-full.sh
bash updates-8.sh
ret_val=$?
popd

0 comments on commit 0e3727d

Please sign in to comment.