From 70d4fd7f645e636fe75865ed29d3c2df1a2765f6 Mon Sep 17 00:00:00 2001 From: Testing closet Date: Wed, 10 Jul 2019 10:19:44 -0700 Subject: [PATCH] cleanup docker container on failure --- Jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index f02c70e47ef0b6..19dc3d4c80863c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,6 +61,11 @@ pipeline { } } post { + failure { + script { + sh "docker rm ${env.DOCKER_NAME} || true" + } + } always { junit "test_results*.xml" }