You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkins...@googlegroups.com
Hi,
Is there something similar in workflow to the "Workspace Cleanup Plugin" we could use to make sure no old files are left in a workspace? Or are we forced to use something like "sh 'rm -r *'" every time we allocate a node?
Regards, Daniel
Jesse Glick
unread,
Mar 19, 2015, 11:26:52 AM3/19/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jenkins...@googlegroups.com
On Tuesday, March 3, 2015 at 9:18:26 AM UTC-5, Daniel P wrote:
Or are we forced to use something like "sh 'rm -r *'" every time we allocate a node?
“sh 'rm -rf *'” is shorter than even the name “Workspace Cleanup Plugin”. :-)
Thomas Gimpel
unread,
Aug 15, 2015, 4:33:03 AM8/15/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
This does not work on a Windows node. One has to use a batch script like this
rmdir /s /q %cd%2>null&exit/b 0
Unfortunately jenkins seems to put that batch script itself into the workspace folder (besides some log files). Thus executing the mentioned batch file deletes that file itself and the command interpreter fails with "The batch file cannot be found.". After that the jenkins job hangs forever. So again, is there simple common way to cleanup the workspace?