Skip to content

Commit 72936f8

Browse files
committed
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.
1 parent 62c351c commit 72936f8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

build-aux/Jenkinsfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ def generateNativeStage(platform) {
358358
finally {
359359
junit '**/.eunit/*.xml, **/_build/*/lib/couchdbtest/*.xml, **/src/mango/nosetests.xml, **/test/javascript/junit.xml'
360360
sh 'killall -9 beam.smp || true'
361-
sh "${wscleanup()}"
361+
// deleteDir is OK here because we're not inside of a Docker container!
362+
deleteDir()
362363
}
363364
} else {
364365
//steps to configure and build CouchDB on Windows platforms
@@ -462,7 +463,8 @@ def generateNativeStage(platform) {
462463
error("Build step failed with error: ${err.getMessage()}")
463464
}
464465
finally {
465-
powershell( script: "Remove-Item -Path '${WORKSPACE}\\*' -Force -Recurse -ErrorAction SilentlyContinue")
466+
// deleteDir is OK here because we're not inside of a Docker container!
467+
deleteDir()
466468
}
467469
}
468470
}

0 commit comments

Comments
 (0)