提交 edda7fb4 编写于 作者: M Mark Field 提交者: Kohsuke Kawaguchi

Add displayName and description as further optional tags that can be submitted...

Add displayName and description as further optional tags that can be submitted as part of an External run
上级 46e8ed3f
......@@ -76,6 +76,9 @@ Upcoming changes</a>
<li class=bug>
Project names in fingerprint records weren't updated when a project is renamed.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-10330">issue 10330</a>)
<li class=rfe>
External job submision now supports &ly;displayName> and &lt;description> elements
(<a href="https://github.com/jenkinsci/jenkins/pull/215">pull 215</a>)
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -130,11 +130,20 @@ public class ExternalRun extends Run<ExternalJob,ExternalRun> {
Result r = Integer.parseInt(elementText(p))==0?Result.SUCCESS:Result.FAILURE;
p.nextTag(); // get to <duration> (optional)
if(p.getEventType()== START_ELEMENT
&& p.getLocalName().equals("duration")) {
duration[0] = Long.parseLong(elementText(p));
}
do {
p.nextTag();
if(p.getEventType()== START_ELEMENT){
if(p.getLocalName().equals("duration")) {
duration[0] = Long.parseLong(elementText(p));
}
else if(p.getLocalName().equals("displayName")) {
setDisplayName(p.getElementText());
}
else if(p.getLocalName().equals("description")) {
setDescription(p.getElementText());
}
}
} while(!(p.getEventType() == END_ELEMENT && p.getLocalName().equals("run")));
return r;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册