提交 39d15d9e 编写于 作者: C Christoph Kutzinski

Merge pull request #214 from rvanoo/master

[FIXED JENKINS-8880] - WorkspaceCleanupThread shouldn't simply delete custom workspace directories
......@@ -96,11 +96,6 @@ public class WorkspaceCleanupThread extends AsyncPeriodicWork {
// TODO: the use of remoting is not optimal.
// One remoting can execute "exists", "lastModified", and "delete" all at once.
TopLevelItem item = Jenkins.getInstance().getItem(jobName);
if(item==null) {
// no such project anymore
LOGGER.fine("Directory "+dir+" is not owned by any project");
return true;
}
if(!dir.exists())
return false;
......@@ -112,6 +107,13 @@ public class WorkspaceCleanupThread extends AsyncPeriodicWork {
return false;
}
// Assuming build name == workspace name breaks custom workspaces. Just skip out if the 30-day window doesn't catch it yet.
// TODO: Add a check that covers custom workspaces, if possible.
// TODO: If and when we do the above, also add checkbox that lets users configure a workspace to never be auto-cleaned.
if(item==null) {
return false;
}
if (item instanceof AbstractProject) {
AbstractProject p = (AbstractProject) item;
Node lb = p.getLastBuiltOn();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册