make sure the weekly cron job runs as ftbfs
This commit is contained in:
parent
1cbf49d162
commit
8958d98c8e
3 changed files with 10 additions and 31 deletions
|
@ -1,32 +1,2 @@
|
|||
#!/bin/bash
|
||||
# A weekly cron job which actually does the items needed.
|
||||
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
|
||||
|
||||
#FTBFS Weekly Reminder
|
||||
|
||||
su - ftbfs /usr/local/bin/ftbsh.sh
|
||||
|
|
|
@ -27,3 +27,6 @@ else
|
|||
echo "Unable to create ${TMPDIR}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#FTBFS Weekly Reminder
|
||||
|
||||
|
|
|
@ -49,6 +49,12 @@
|
|||
tags:
|
||||
- ftbfs
|
||||
|
||||
- name: copy ftbfs weekly script
|
||||
copy: src="ftbfs.sh" dest=/usr/local/bin/ftbfs.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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue