From 6593e53f8f9d8c0d953d0356b85a4d0d712374b4 Mon Sep 17 00:00:00 2001 From: Aidan Feldman Date: Thu, 30 Nov 2017 14:08:59 -0500 Subject: [PATCH] cleanWs() in post block --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 159e6d4..c76be6a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent none + agent any triggers { // every minute @@ -24,8 +24,6 @@ pipeline { sh 'ansible-playbook --version' sh 'terraform version' - // clean the workspace - deleteDir() checkout scm sh 'pwd' sh 'ls -a' @@ -56,4 +54,9 @@ pipeline { } } } + post { + always { + cleanWs() + } + } }