cron-script.sh revision 13467
# Sample usage in crontab: # Run, Mon-Fri at 1:30am. Add to build user's crontab. # The same with a jail. Add to root's crontab. Example assumes 'gbuild' is the # directory to copy rpms/srpms to on the remote host # date format appended to the Release tag in the spec files # (passed to the date command on the cmd line) # date format used for naming the directories # document root of the web server # subdir to keep logs and reports on the webserver # ------------ nothing to configure below this line -------------- echo " ,---------------------------------------------------------------." echo "| This script is intended to be run from cron for producing |" echo "| official nightly builds. It will mail responsible engineers |" echo "| if any build failure occurs, sends build reports to v" echo "| RE and update web pages." echo "| Don't run it unless you know what you are doing. Thanks." echo "| Mail gnome-re@sun.com if you need more info." # remove temporary files on exit # make a copy of the cron script in /tmp and execute that in order to # avoid disasters caused by cvs update. # Update spec-files-other files and uninstall packages. # Revert any local changes # checkout-out SVN copy *MUST* be read-only, or "update" needs passwd # Uninstall the spec-files-other packages. # Uninstall and cleanup spec-files packages. #revert any local changes # checkout-out SVN copy *MUST* be read-only, or "update" needs passwd # if the script changed during cvs update, restart with the updated script # uninstall all pkgs left behind by a previous build # remove-gnome will now remove anything left from uninstall-pkgs in case # or a packaging change for example # if the log directory exists, open a new one with numbered suffix # Rebuild the manpage tarballs # Determine whether to do debug or non-debug build. # On 'even' days of the week (Sun, Tues, Thur, Sat) to a debug build. #if [ $DOW -eq "0" ]; then # DEBUG_BUILD="--with-debug" --
prodname=
"${PRODNAME}/s${OSrel}${OSarch}" \
--
summary-
title=
"${PRODNAME} S${OSrel}/${OSarch_full} Nightly Build Report `date +'%d %B %Y'`" \
# the number of failed pkgs is returned --
prodname=
"${PRODNAME}/s${OSrel}${OSarch}" \
--
summary-
title=
"${PRODNAME} S${OSrel}/${OSarch_full} SFO Nightly Build Report `date +'%d %B %Y'`" \
# The number of failed pkgs is returned # End spec-files-other build. # Disable deletion of nightly- dir as network area often full - this is backup. mailx -s
"${PRODNAME} S${OSrel} ${OSarch_full} nightly build: make-jds-dist.pl output" "gnome-re@sun.com" echo " <td>$FAILED package(s) failed</td></tr>"; \ # Report absolute symlinks. These are blockers for Solaris integration. # Count the number of local patches. # send warnings, errors and summary in email # Email Beijing team to begin downloading packages. /
usr/
bin/
echo "*Date: `date '+%Y-%m-%d'`*\n${PRODNAME} S${OSrel} ${OSarch_full} Development nightly build finished: jdsserv.ireland:${RPMSDIR}/download" |
mailx -s
"${PRODNAME} S${OSrel} ${OSarch_full} Development nightly build: $FAILED pkgs failed" "sunop@triathlon.prc.sun.com,sunop@mhw.prc.sun.com" # find any differences from the prototype files saved after the # if any diffs found mail the result to RE ( echo "Prototype changes found since the last milestone build:" mailx -s "${PRODNAME} S${OSrel} ${OSarch_full} prototype changes" \