提交 fb61413c 编写于 作者: K Kohsuke Kawaguchi

Merge branch 'pull-551'

......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Matrix jobs are kept forever even if it's not needed
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-14991">issue 14991</a>)
<li class=bug>
'groovysh' command should be able to see all the plugin classes.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-14982">issue 14982</a>)
......
......@@ -104,7 +104,7 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
return;
}
List<MatrixRun> runs = getRuns();
List<MatrixRun> runs = getExactRuns();
for(MatrixRun run : runs){
why = run.getWhyKeepLog();
if (why!=null) {
......@@ -246,11 +246,26 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
@Override
public String getWhyKeepLog() {
MatrixBuild b = getNextBuild();
if (b!=null && b.isPartial())
if (isLinkedBy(b))
return b.getDisplayName()+" depends on this";
return super.getWhyKeepLog();
}
/**
* @return True if another {@link MatrixBuild} build (passed as a parameter) depends on this build.
* @since 1.481
*/
public boolean isLinkedBy(MatrixBuild b) {
if(null == b)
return false;
for(MatrixConfiguration c : b.getParent().getActiveConfigurations()) {
MatrixRun r = c.getNearestOldBuild(b.getNumber());
if (r != null && r.getNumber()==getNumber())
return true;
}
return false;
}
/**
* True if this build didn't do a full build and it is depending on the result of the previous build.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册