summaryrefslogtreecommitdiffstats
path: root/hosts/jenkins/etc
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-08-27 10:06:55 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-08-27 10:08:07 +0000
commit6240a7788b6ebc4191965b3ee840055fe7107e00 (patch)
tree391b50530d865da0c3bc72cd60054db4ee70f069 /hosts/jenkins/etc
parenta50f8f3f9f10c7cd50f1d95d425fff0fc19b037c (diff)
downloadjenkins.debian.net-6240a7788b6ebc4191965b3ee840055fe7107e00.tar.xz
jenkins/etc/init.d: clean up reproducible db from "ongoing" builds before starting jenkins
Diffstat (limited to 'hosts/jenkins/etc')
-rw-r--r--hosts/jenkins/etc/init.d/jenkins3
1 files changed, 3 insertions, 0 deletions
diff --git a/hosts/jenkins/etc/init.d/jenkins b/hosts/jenkins/etc/init.d/jenkins
index ccb33d5d..b2c57bf8 100644
--- a/hosts/jenkins/etc/init.d/jenkins
+++ b/hosts/jenkins/etc/init.d/jenkins
@@ -92,6 +92,9 @@ check_tcp_port() {
#
do_start()
{
+ # Clean up the Reproducible Builds database from running builds
+ sqlite3 /var/lib/jenkins/reproducible.db "UPDATE schedule SET date_build_started = '' WHERE date_build_started != '';" || true
+
# the default location is /var/run/jenkins/jenkins.pid but the parent directory needs to be created
mkdir `dirname $PIDFILE` > /dev/null 2>&1 || true
chown $JENKINS_USER `dirname $PIDFILE`