diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile
index a90b0cf8e08a91cff3cc573322d10fc5fcee55a6..ca43a60034515fac85c0136021f0f1606481931e 100644
--- a/tests/CI/gates.jenkinsfile
+++ b/tests/CI/gates.jenkinsfile
@@ -54,7 +54,7 @@ pipeline {
 				onUnstable: false
 			]
 	}
-	
+
 	agent {
 		/* All of the stages need to be performed on a docker host */
 		label "swdev-docker"
@@ -78,9 +78,9 @@ pipeline {
 					manager.createSummary("/plugin/workflow-job/images/48x48/pipelinejob.png").appendText("Docker Host: ${NODE_NAME}", false)
 
 					stage ("Checkout") {
-						sh "sudo chown -R jenkins:users ."  
+						sh "sudo chown -R jenkins:users ."
 						env.GERRIT_PROJECT_URL = env.GIT_URL.replaceAll(/[^\/]+$/, env.GERRIT_PROJECT)
-					
+
 						/*
 						 * Jenkins has already automatically checked out the base branch
 						 * for this change but we now need to check out the change itself
@@ -191,7 +191,7 @@ pipeline {
 									}
 
 									sh "sudo rm -rf ${groupDir} || : "
-									
+
 									withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}",
 										passwordVariable: 'GERRIT_USER_PW', usernameVariable: 'GERRIT_USER_NAME')]) {
 										checkout scm: [$class: 'GitSCM',
@@ -237,8 +237,7 @@ pipeline {
 	}
 	post {
 		cleanup {
-			sh "sudo make distclean >/dev/null 2>&1 || : "
-			sh "sudo rm -rf tests/CI/output >/dev/null 2>&1 || : "
+            cleanWs deleteDirs: true, notFailBuild: true
 		}
 		/*
 		 * The Gerrit Trigger will automatically post the "Verified" results back
diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile
index ae5a5f440cd467ef1b9aa57edff70d42152a43aa..5a37bb9c21f793867f0ff838f32f52b81ca38d15 100644
--- a/tests/CI/periodics-daily.jenkinsfile
+++ b/tests/CI/periodics-daily.jenkinsfile
@@ -157,8 +157,7 @@ pipeline {
 	}
 	post {
 		cleanup {
-			sh "sudo make distclean >/dev/null 2>&1 || : "
-			sh "sudo rm -rf tests/CI/output >/dev/null 2>&1 || : "
+            cleanWs deleteDirs: true, notFailBuild: true
 		}
 		success {
 			echo "Reporting ${currentBuild.currentResult} Passed"
diff --git a/tests/CI/ref_debug.jenkinsfile b/tests/CI/ref_debug.jenkinsfile
index 0e0f49c1bda67cb7db4a7ccaf2b1ebece0cbd4ec..9e20600e094296c5ea565b1d0126fc6af0572367 100644
--- a/tests/CI/ref_debug.jenkinsfile
+++ b/tests/CI/ref_debug.jenkinsfile
@@ -26,7 +26,7 @@ pipeline {
 	triggers {
 		cron 'H H(0-4) * * 0'
 	}
-	
+
 	agent {
 		/* All of the stages need to be performed on a docker host */
 		label "swdev-docker"
@@ -40,7 +40,7 @@ pipeline {
 					manager.createSummary("/plugin/workflow-job/images/48x48/pipelinejob.png").appendText("Docker Host: ${NODE_NAME}", false)
 
 					stage ("Checkout") {
-						sh "sudo chown -R jenkins:users ."  
+						sh "sudo chown -R jenkins:users ."
 						sh "printenv | sort"
 						sh "sudo tests/CI/setupJenkinsEnvironment.sh"
 					}
@@ -93,7 +93,7 @@ pipeline {
 									}
 
 									sh "sudo rm -rf ${groupDir} || : "
-									
+
 									checkout scm: [$class: 'GitSCM',
 										branches: [[name: "${BRANCH_NAME}"]],
 											extensions: [
@@ -127,8 +127,7 @@ pipeline {
 	}
 	post {
 		cleanup {
-			sh "sudo make distclean >/dev/null 2>&1 || : "
-			sh "sudo rm -rf tests/CI/output >/dev/null 2>&1 || : "
+            cleanWs deleteDirs: true, notFailBuild: true
 		}
 		success {
 			echo "Reporting ${currentBuild.currentResult} Passed"
diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile
index 3961cf538b2bf4e4a30d48cbf337f89b3b093c0c..c2467d7fb0ef5541b06a9b485efb8ed9c77d6cb8 100644
--- a/tests/CI/unittests.jenkinsfile
+++ b/tests/CI/unittests.jenkinsfile
@@ -181,8 +181,7 @@ pipeline {
 	}
 	post {
 		cleanup {
-			sh "sudo make distclean >/dev/null 2>&1 || : "
-			sh "sudo rm -rf tests/CI/output >/dev/null 2>&1 || : "
+            cleanWs deleteDirs: true, notFailBuild: true
 		}
 		/*
 		 * The Gerrit Trigger will automatically post the "Verified" results back