From a89fd1e4d9c91c1cde675c11c0b3d86cbf2ff0fe Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Tue, 10 Mar 2020 08:03:21 +0100 Subject: [PATCH] add clean workspace to jenkins templates --- snippets/jenkins/template/general/Jenkinsfile | 3 +++ snippets/jenkins/template/node/Jenkinsfile | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/snippets/jenkins/template/general/Jenkinsfile b/snippets/jenkins/template/general/Jenkinsfile index 3bed245..d0d1a76 100644 --- a/snippets/jenkins/template/general/Jenkinsfile +++ b/snippets/jenkins/template/general/Jenkinsfile @@ -35,5 +35,8 @@ pipeline { } } } + cleanup { + cleanWs() + } } } diff --git a/snippets/jenkins/template/node/Jenkinsfile b/snippets/jenkins/template/node/Jenkinsfile index 81d532c..941783e 100644 --- a/snippets/jenkins/template/node/Jenkinsfile +++ b/snippets/jenkins/template/node/Jenkinsfile @@ -20,4 +20,10 @@ pipeline { } } } + + post { + cleanup { + cleanWs() + } + } }