It is possible to find the declarative pipeline syntax for cleanWs in the pipeline-syntax snippet generator inside a Jenkins instance. I have however not found any instructions on how to use preBuildCleanup in a declarative pipeline. I don't even know if it is possible.
|Remote Link||This issue links to "jenkinsci/ws-cleanup-plugin#49 (Web Link)" [ 26365 ]|
|Status||Open [ 1 ]||In Progress [ 3 ]|
|Status||In Progress [ 3 ]||In Review [ 10005 ]|
|Assignee||Oliver Gondža [ olivergondza ]|
|Resolution||Won't Fix [ 2 ]|
|Status||In Review [ 10005 ]||Closed [ 6 ]|