Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
jenkins
提交
3a57b104
J
jenkins
项目概览
野花太放肆
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3a57b104
编写于
8月 15, 2011
作者:
C
Christoph Kutzinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
changelog for JENKINS-8880 and minor follow-up changes
上级
4d215470
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
8 deletion
+12
-8
changelog.html
changelog.html
+3
-0
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
+9
-8
未找到文件。
changelog.html
浏览文件 @
3a57b104
...
...
@@ -84,6 +84,9 @@ Upcoming changes</a>
<li
class=
bug
>
Disable auto refresh in slave markOffline screen
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-10608"
>
issue 10608
</a>
)
<li
class=
bug
>
Workspace-cleanup thread shouldn't delete custom workspace directories
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-8880"
>
issue 8880
</a>
)
<li
class=
rfe
>
Improved the speed of shutdown
<li
class=
rfe
>
...
...
core/src/main/java/hudson/model/WorkspaceCleanupThread.java
浏览文件 @
3a57b104
...
...
@@ -92,10 +92,10 @@ public class WorkspaceCleanupThread extends AsyncPeriodicWork {
}
}
private
boolean
shouldBeDeleted
(
String
job
Name
,
FilePath
dir
,
Node
n
)
throws
IOException
,
InterruptedException
{
private
boolean
shouldBeDeleted
(
String
workspaceDirectory
Name
,
FilePath
dir
,
Node
n
)
throws
IOException
,
InterruptedException
{
// TODO: the use of remoting is not optimal.
// One remoting can execute "exists", "lastModified", and "delete" all at once.
TopLevelItem
item
=
Jenkins
.
getInstance
().
getItem
(
job
Name
);
TopLevelItem
item
=
Jenkins
.
getInstance
().
getItem
(
workspaceDirectory
Name
);
if
(!
dir
.
exists
())
return
false
;
...
...
@@ -107,15 +107,16 @@ 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.
// Could mean that directory doesn't belong to a job. But can also mean that it's a custom workspace belonging to a job.
// So better leave it alone - will still be deleted after 30 days - until we have a proper check for custom workspaces.
// TODO: implement proper check for custom workspaces.
// TODO: If we do the above, could also be good to 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
;
if
(
item
instanceof
AbstractProject
<?,?>
)
{
AbstractProject
<?,?>
p
=
(
AbstractProject
<?,?>
)
item
;
Node
lb
=
p
.
getLastBuiltOn
();
LOGGER
.
finer
(
"Directory "
+
dir
+
" is last built on "
+
lb
);
if
(
lb
!=
null
&&
lb
.
equals
(
n
))
{
...
...
@@ -177,5 +178,5 @@ public class WorkspaceCleanupThread extends AsyncPeriodicWork {
/**
* Can be used to disable workspace clean up.
*/
public
static
boolean
disabled
=
Boolean
.
getBoolean
(
WorkspaceCleanupThread
.
class
.
getName
()+
".disabled"
);
public
static
final
boolean
disabled
=
Boolean
.
getBoolean
(
WorkspaceCleanupThread
.
class
.
getName
()+
".disabled"
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录