[Qa-jenkins-scm] [jenkins.debian.net] 01/01: add --force option

Holger Levsen holger at layer-acht.org
Mon Aug 1 03:22:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 1999a3a3f9f393aed75e51dad488e21bf3ae0cbb
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun Jul 31 23:21:54 2016 -0400

    add --force option
---
 bin/reproducible_cleanup_nodes.sh | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/bin/reproducible_cleanup_nodes.sh b/bin/reproducible_cleanup_nodes.sh
index cad6bfa..9656a65 100755
--- a/bin/reproducible_cleanup_nodes.sh
+++ b/bin/reproducible_cleanup_nodes.sh
@@ -20,12 +20,14 @@ elif [ "$(whoami)" != "jenkins" ] ; then
 fi
 
 # deny running this if jenkins is still running
-RESULT=$(ps fax|grep '/usr/share/jenkins/jenkins.war'|grep -v grep||true)
-if [ -n "$RESULT" ] ; then
-	echo "jenkins is still running, aborting."
-	exit 1
-else
-	echo "jenkins is not running, ok, let's go."
+if [ "$1" != "--force" ] ; then
+	RESULT=$(ps fax|grep '/usr/share/jenkins/jenkins.war'|grep -v grep||true)
+	if [ -n "$RESULT" ] ; then
+		echo "jenkins is still running, aborting."
+		exit 1
+	else
+		echo "jenkins is not running, ok, let's go."
+	fi
 fi
 
 # simple confirmation needed

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list