I have a number of Jenkins pipeline and I would like to delete the directory when the pipeline finishes, (pass or fail).
I have added the following stage to all of my pipelines.
post {
always {
step([$class: 'WsCleanup'])
}
}
This does work, but somewhere during the clean up it creates another folder in the same dir and makes it as ws-cleanup eg.
myservices_ws-cleanup_1571049838662
Is it possible to delete the directory without creating the ws-cleanup directory?