From 6240a7788b6ebc4191965b3ee840055fe7107e00 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 27 Aug 2015 10:06:55 +0000 Subject: jenkins/etc/init.d: clean up reproducible db from "ongoing" builds before starting jenkins --- hosts/jenkins/etc/init.d/jenkins | 3 +++ 1 file changed, 3 insertions(+) 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` -- cgit v1.2.3-54-g00ecf