From 494d9c5b6b8d033e526cbd0534a5a8d9e16faeb3 Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Tue, 18 Oct 2016 16:31:17 -0400 Subject: [PATCH] Better cleanup --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b2f78c6..d0421b9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,7 +50,6 @@ node('docker') { dir('haproxy'){ sh 'docker build --rm -t my/haproxy . > debug' sh 'rm debug' - sh 'docker rm haproxy' } } catch(error) { def error_details = readFile('haproxy/debug'); @@ -124,6 +123,8 @@ def handleError(String message, String tag, Boolean doCleanup = true){ def cleanup(String tag) { try{ sh 'bin/decompose.sh &> debug' + sh 'docker rm haproxy' + sh 'docker rmi my/haproxy' sh 'bin/prune.sh &> debug' } catch(error) { def error_details = readFile('./debug');