Skip to content

Commit e781ed6

Browse files
author
Louis Abel
committed
add lookahead-9 cron
1 parent 5d0f85b commit e781ed6

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

cron/lookahead-9

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
3+
FROMMAIL="Compose Tracker <releng@rockylinux.org>"
4+
export RLVER=9
5+
source "/root/toolkit/sync/common"
6+
rm -rf /etc/pungi-lh-${MAJOR}
7+
git clone https://git.rockylinux.org/rocky/pungi-rocky.git -b r${RLVER}s /etc/pungi-lh-${MAJOR}
8+
ret_val=$?
9+
if [ "$ret_val" -ne 0 ]; then
10+
echo "Git pull failed for LookAhead pungi config" | mutt -e "set from=\"$FROMMAIL\"" \
11+
-e 'set envelope_from=yes' \
12+
-s "Git pull on /etc/pungi-lh-${MAJOR} failed" \
13+
releng@rockylinux.org
14+
exit 1
15+
fi
16+
pushd /etc/pungi-lh-${MAJOR}/scripts/compose || { echo "Pungi directory not found"; exit; }
17+
bash produce-${MAJOR}-lookahead-full.sh
18+
ret_val=$?
19+
popd || { echo "Could not go back to the previous directory"; exit; }
20+
21+
if [ "$ret_val" -eq 0 ]; then
22+
pushd /root/toolkit/sync || { echo "Toolkit directory not found"; exit; }
23+
RLVER=9 bash lh-release-sync-to-staging.sh
24+
popd || { echo "Could not go back to previous directory"; exit; }
25+
fi

0 commit comments

Comments
 (0)