Add in cron job for grobisplitter and set rhel8 to run daily

This commit is contained in:
Stephen Smoogen 2019-06-01 21:58:36 +00:00
parent 79d6116ace
commit fab2e5c0e1
4 changed files with 11 additions and 6 deletions

View file

@ -1,2 +1,3 @@
30 2 * * * root /mnt/fedora/app/fi-repo/rhel/rhel6/rhel6-sync > /dev/null
30 3 * * * root /mnt/fedora/app/fi-repo/rhel/rhel7/rhel7-sync > /dev/null
30 4 * * * root /mnt/fedora/app/fi-repo/rhel/rhel8/rhel8-sync > /dev/null

View file

@ -0,0 +1 @@
00 07 * * * root /usr/local/bin/rhel8-split.sh

View file

@ -35,17 +35,17 @@ for ARCH in ${ARCHES}; do
fi
# Begin splitting the various packages into their subtrees
${BINDIR}/splitter.py --action hardlink --target RHEL-8-001 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-baseos-rpms/ --only-defaults
${BINDIR}/splitter.py --action hardlink --target RHEL-8-001 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-baseos-rpms/ --only-defaults &> /dev/null
if [ $? -ne 0 ]; then
echo "splitter ${ARCH} baseos failed"
exit
fi
${BINDIR}/splitter.py --action hardlink --target RHEL-8-002 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-appstream-rpms/ --only-defaults
${BINDIR}/splitter.py --action hardlink --target RHEL-8-002 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-appstream-rpms/ --only-defaults &> /dev/null
if [ $? -ne 0 ]; then
echo "splitter ${ARCH} appstream failed"
exit
fi
${BINDIR}/splitter.py --action hardlink --target RHEL-8-003 --create-repos ${ARCHDIR}/codeready-builder-for-rhel-8-${ARCH}-rpms/
${BINDIR}/splitter.py --action hardlink --target RHEL-8-003 --create-repos ${ARCHDIR}/codeready-builder-for-rhel-8-${ARCH}-rpms/ &> /dev/null
if [ $? -ne 0 ]; then
echo "splitter ${ARCH} codeready failed"
exit
@ -66,12 +66,12 @@ for ARCH in ${ARCHES}; do
# Build out the repos we have and merge them together with
# mergerepo -k
echo "Merge all the repos"
echo "Merging all the repos"
repos=""
for i in $( ls -1 ); do
repos+="-r $i "
done
mergerepo_c -v -k ${repos}
mergerepo_c -k ${repos}
popd
# Cleanup the trash

View file

@ -24,4 +24,7 @@
tags:
- grobi
## Cron job goes here.
- name: daily cron job to split and merge repos
copy: src={{item}} dest=/etc/cron.d/ mode=0644
with_items:
- rhel8-split.cron