Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
1941f098
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
1941f098
编写于
8月 12, 2014
作者:
K
Kohsuke Kawaguchi
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/BuildStep-Job'
This really merges pull request #1330
上级
a92245a5
8c038bba
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
4 deletion
+12
-4
core/src/main/java/hudson/model/Fingerprint.java
core/src/main/java/hudson/model/Fingerprint.java
+4
-2
core/src/main/java/hudson/tasks/Fingerprinter.java
core/src/main/java/hudson/tasks/Fingerprinter.java
+8
-2
未找到文件。
core/src/main/java/hudson/model/Fingerprint.java
浏览文件 @
1941f098
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
package
hudson.model
;
package
hudson.model
;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableList
;
import
com.infradna.tool.bridge_method_injector.WithBridgeMethods
;
import
com.thoughtworks.xstream.XStream
;
import
com.thoughtworks.xstream.XStream
;
import
com.thoughtworks.xstream.converters.Converter
;
import
com.thoughtworks.xstream.converters.Converter
;
import
com.thoughtworks.xstream.converters.MarshallingContext
;
import
com.thoughtworks.xstream.converters.MarshallingContext
;
...
@@ -119,8 +120,9 @@ public class Fingerprint implements ModelObject, Saveable {
...
@@ -119,8 +120,9 @@ public class Fingerprint implements ModelObject, Saveable {
* Gets the {@link Job} that this pointer points to,
* Gets the {@link Job} that this pointer points to,
* or null if such a job no longer exists.
* or null if such a job no longer exists.
*/
*/
public
AbstractProject
getJob
()
{
// TODO add variant returning Job
@WithBridgeMethods
(
value
=
AbstractProject
.
class
,
castRequired
=
true
)
return
Jenkins
.
getInstance
().
getItemByFullName
(
name
,
AbstractProject
.
class
);
public
Job
<?,?>
getJob
()
{
return
Jenkins
.
getInstance
().
getItemByFullName
(
name
,
Job
.
class
);
}
}
/**
/**
...
...
core/src/main/java/hudson/tasks/Fingerprinter.java
浏览文件 @
1941f098
...
@@ -39,6 +39,7 @@ import hudson.model.DependencyGraph.Dependency;
...
@@ -39,6 +39,7 @@ import hudson.model.DependencyGraph.Dependency;
import
hudson.model.Fingerprint
;
import
hudson.model.Fingerprint
;
import
hudson.model.Fingerprint.BuildPtr
;
import
hudson.model.Fingerprint.BuildPtr
;
import
hudson.model.FingerprintMap
;
import
hudson.model.FingerprintMap
;
import
hudson.model.Job
;
import
jenkins.model.Jenkins
;
import
jenkins.model.Jenkins
;
import
hudson.model.Result
;
import
hudson.model.Result
;
import
hudson.model.Run
;
import
hudson.model.Run
;
...
@@ -432,8 +433,13 @@ public class Fingerprinter extends Recorder implements Serializable, DependencyD
...
@@ -432,8 +433,13 @@ public class Fingerprinter extends Recorder implements Serializable, DependencyD
if
(
bp
.
is
(
build
))
continue
;
// we are the owner
if
(
bp
.
is
(
build
))
continue
;
// we are the owner
try
{
try
{
AbstractProject
job
=
bp
.
getJob
();
Job
job
=
bp
.
getJob
();
if
(
job
==
null
)
continue
;
// project no longer exists
if
(
job
==
null
)
continue
;
// project no longer exists
if
(!(
job
instanceof
AbstractProject
))
{
// Ignoring this for now. In the future we may want a dependency map function not limited to AbstractProject.
// (Could be used by getDependencyChanges if pulled up from AbstractBuild into Run, for example.)
continue
;
}
if
(
job
.
getParent
()==
build
.
getParent
())
if
(
job
.
getParent
()==
build
.
getParent
())
continue
;
// we are the parent of the build owner, that is almost like we are the owner
continue
;
// we are the parent of the build owner, that is almost like we are the owner
if
(!
includeMissing
&&
job
.
getBuildByNumber
(
bp
.
getNumber
())==
null
)
if
(!
includeMissing
&&
job
.
getBuildByNumber
(
bp
.
getNumber
())==
null
)
...
@@ -442,7 +448,7 @@ public class Fingerprinter extends Recorder implements Serializable, DependencyD
...
@@ -442,7 +448,7 @@ public class Fingerprinter extends Recorder implements Serializable, DependencyD
Integer
existing
=
r
.
get
(
job
);
Integer
existing
=
r
.
get
(
job
);
if
(
existing
!=
null
&&
existing
>
bp
.
getNumber
())
if
(
existing
!=
null
&&
existing
>
bp
.
getNumber
())
continue
;
// the record in the map is already up to date
continue
;
// the record in the map is already up to date
r
.
put
(
job
,
bp
.
getNumber
());
r
.
put
(
(
AbstractProject
)
job
,
bp
.
getNumber
());
}
catch
(
AccessDeniedException
e
)
{
}
catch
(
AccessDeniedException
e
)
{
// Need to log in to access this job, so ignore
// Need to log in to access this job, so ignore
continue
;
continue
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录