[ftbfs] try to get this script to run and be verbose about it

This commit is contained in:
Stephen Smoogen 2019-07-01 13:24:08 +00:00
parent 21eeb216ed
commit cc0bc4063b
3 changed files with 35 additions and 1 deletions

View file

@ -1,2 +1,2 @@
#FTBFS Weekly Reminder
* * 0 0 * ftbfs TMPDIR=`mktemp -d /tmp/ftbfs_reminder.XXXXXX` && pushd $TMPDIR && git clone https://pagure.io/releng.git && pushd releng/scripts && ./ftbfs_weekly_reminder.py && popd && popd && popd &&rm -rf $TMPDIR
* * 0 0 * ftbfs /usr/local/bin/ftbfs.sh

View file

@ -0,0 +1,28 @@
#!/bin/bash
TMPDIR=`mktemp -d /tmp/ftbfs_reminder.XXXXXX`
GITREPO=https://pagure.io/releng.git
SCRIPT=ftbfs_weekly_reminder.py
if [ $? -eq 0 ]; then
cd ${TMPDIR}
git clone ${GITREPO}
if [ $? -eq 0 ]; then
cd releng/scripts
./${SCRIPT}
if [ $? -ne 0 ]; then
echo "${SCRIPT} had an error condition"
echo "Look in ${TMPDIR} for more info"
# Do not clean up trash
exit 1
fi
else
echo "Unable to clone ${GITREPO}"
echo "Look in ${TMPDIR} for more info"
# Do not clean up trash
exit 1
fi
cd /tmp/
rm -rf $TMPDIR
else
echo "Unable to create ${TMPDIR}"
exit 1
fi

View file

@ -49,6 +49,12 @@
tags:
- ftbfs
- name: copy over ftbfs master script.
copy: src="ftbfs.sh" dest=/usr/local/bin/sh mode=755
when: inventory_hostname.startswith('compose-x86-01')
tags:
- ftbfs
- name: add ftbfs weekly cron job
copy: src="ftbfs.cron" dest=/etc/cron.weekly/ mode=755
when: inventory_hostname.startswith('compose-x86-01')