1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
#!/bin/bash
TOPDIR=$(dirname $0)
if [ "$TOPDIR" = "." ] ; then
TOPDIR=`pwd`
fi
export TOPDIR
. $TOPDIR/settings.sh
. $TOPDIR/daily.sh
. $TOPDIR/common.sh
BUILDLOCK=$HOME/.debian-cd.lock
BUILDS_RUNNING=""
if [ "$RELEASE_BUILD"x = ""x ] ; then
export SID_WANTED=1
export OUT_FREE_SID=${PUBDIRJIG}/sid_d-i/${DATE_BUILD}
export RSYNC_TARGET_FREE=${OUT_BASE}/daily-builds
else
echo "Don't support release builds of dailies! Use cronjob.weekly instead"
exit 1
fi
export DI=sid
export DI_DIST=$DI
export DI_CODENAME=$DI
export DI_WWW_HOME=default
export DI_DIR="$ARCH_DI_DIR"
if [ "$PARALLEL"x = ""x ]; then
PARALLEL=20
fi
# Make sure the machine isn't rebooted while we're busy
reboot_lock
cd $TOPDIR &&
if lockfile -r0 $BUILDLOCK ; then
# echo "NOT checking for git updates"
echo "git update debian-cd"
cd debian-cd && git pull ; cd ..
cd $TOPDIR
# Do the build in parallel
make -f Makefile.daily -j $PARALLEL $TARGETS
if [ "$NOSYNC"x = ""x ] ; then
echo "Clean up old builds on build machine:"
for DIR in $PUBDIRJIG/* ; do
cd $DIR
for THIS in 20* ; do
if [ $THIS != $DATE-$BUILDNUM ] ; then
echo " Deleting $DIR/$THIS"
rm -rf $DIR/$THIS
fi
done
done
echo "Sync normal builds across to output dir: $RSYNC_TARGET_FREE"
rsync -rHlt $PUBDIRJIG/ $RSYNC_TARGET_FREE/
echo "Remove extra builds:"
~/bin/remove_extra_dailies
echo "$DATE-$BUILDNUM" > $RSYNC_TARGET_FREE/daily-trace
case $(hostname) in
pettersson*)
ISO_OPTIONS='--exclude .iso-wanted'
;;
*)
ISO_OPTIONS='--exclude *.iso'
;;
esac
(cd ${RSYNC_TARGET_FREE}/sid_d-i/${DATE_BUILD} && find . -name '*.iso' > .iso-wanted)
rsync_to_umu ${RSYNC_TARGET_FREE}/sid_d-i/${DATE_BUILD}/ \
daily-builds/sid_d-i/${DATE_BUILD}/ \
"$ISO_OPTIONS"
publish_at_umu daily-builds/sid_d-i/${DATE_BUILD}
trigger_openqa daily-builds/sid_d-i/${DATE_BUILD} "$(debversion)" ${DATE_BUILD} amd64,arm64
rsync_to_umu ${OUT_BASE}/cd-sources/ cd-sources/
publish_at_umu cd-sources
fi
cd $TOPDIR
rm -f $BUILDLOCK
fi
|