From 4f387fec8d20a94bbd37a67866477e5e589f171f Mon Sep 17 00:00:00 2001 From: Ronny Berndt Date: Sat, 28 Mar 2026 16:01:39 +0100 Subject: [PATCH] ci: Use deleteDir() (non Docker workers) to cleanup workspace directory We can use deleteDir() at the end of the native stages. On Windows the cleanup command doesn't work completely, replace it with the provided Jenkins method. Use it at the other native CI workers too. --- build-aux/Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build-aux/Jenkinsfile b/build-aux/Jenkinsfile index 0b9b643afa..1cc60dfd1e 100644 --- a/build-aux/Jenkinsfile +++ b/build-aux/Jenkinsfile @@ -358,7 +358,8 @@ def generateNativeStage(platform) { finally { junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml' sh 'killall -9 beam.smp || true' - sh "${wscleanup()}" + // deleteDir is OK here because we're not inside of a Docker container! + deleteDir() } } else { //steps to configure and build CouchDB on Windows platforms @@ -462,7 +463,8 @@ def generateNativeStage(platform) { error("Build step failed with error: ${err.getMessage()}") } finally { - powershell( script: "Remove-Item -Path '${WORKSPACE}\\*' -Force -Recurse -ErrorAction SilentlyContinue") + // deleteDir is OK here because we're not inside of a Docker container! + deleteDir() } } }