提交 406692a0 编写于 作者: J Joerg Jaspert

buildd

lock the buildd push, only one can go out at any time.
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
上级 a6340dca
......@@ -25,6 +25,20 @@ function debug () {
fi
}
function wbtrigger() {
MODE=${1:-"often"}
SSHOPT="-o BatchMode=yes -o ConnectTimeout=30 -o SetupTimeout=240"
if lockfile -r 3 -l 3600 "${LOCK_BUILDD}"; then
if [ "x${MODE}x" = "xdailyx" ]; then
ssh -o ${SSHOPT} wbadm@buildd /org/wanna-build/trigger.daily || echo "W-B trigger.daily failed" | mail -s "W-B Daily trigger failed" ftpmaster@ftp-master.debian.org
elif [ "x${MODE}x" = "xoftenx" ]; then
ssh -q -q ${SSHOPT} wbadm@buildd /org/wanna-build/trigger.often
else
log_error "Unknown wb trigger mode called"
fi
fi
}
# used by cron.dinstall *and* cron.unchecked.
function make_buildd_dir () {
dak manage-build-queues -v buildd
......
#! /bin/sh
#
# Called from cron.unchecked to update wanna-build, each time it runs.
#
ssh -q -q -o BatchMode=yes -o ConnectTimeout=30 -o SetupTimeout=240 wbadm@buildd /org/wanna-build/trigger.often
exit 0
......@@ -33,6 +33,7 @@ LOCKDAILY=""
LOCKFILE="$lockdir/unchecked.lock"
LOCK_NEW="$lockdir/processnew.lock"
NOTICE="$lockdir/daily.lock"
LOCK_BUILDD="$lockdir/buildd.lock"
# our name
PROGRAM="unchecked"
......@@ -69,8 +70,7 @@ function do_buildd () {
fi
done
make_buildd_dir
. $configdir/cron.buildd
wbtrigger "often"
fi
}
......
......@@ -418,7 +418,7 @@ function mirror() {
function wb() {
log "Trigger daily wanna-build run"
ssh -o BatchMode=yes -o SetupTimeOut=90 -o ConnectTimeout=90 wbadm@buildd /org/wanna-build/trigger.daily || echo "W-B trigger.daily failed" | mail -s "W-B Daily trigger failed" ftpmaster@ftp-master.debian.org
wbtrigger "daily"
}
function expire() {
......
......@@ -38,3 +38,6 @@ LOCK_BRITNEY="$lockdir/britney.lock"
# If this file exists we exit immediately after the currently running
# function is done
LOCK_STOP="$lockdir/archive.stop"
# Lock buildd updates
LOCK_BUILDD="$lockdir/buildd.lock"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册