提交 0dcfae19 编写于 作者: K kohsuke

MatrixRun should use the same timestamp so that SCM can check out the same ws...

MatrixRun should use the same timestamp so that SCM can check out the same ws for all configurations.
This breaks some of the UI (in some sense) --- for example, the web page would report that the build started 15 mins ago, when in fact it hasn't been sitting in the queue for the most of the time.
The build duration is still computed correctly.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3574 71c3de6d-444a-0410-be80-ed276b4c234a
上级 b4b63838
......@@ -86,6 +86,17 @@ public class MatrixConfiguration extends Project<MatrixConfiguration,MatrixRun>
return MatrixRun.class;
}
@Override
protected MatrixRun newBuild() throws IOException {
// for every MatrixRun there should be a parent MatrixBuild
MatrixBuild lb = getParent().getLastBuild();
MatrixRun lastBuild = new MatrixRun(this, lb.getTimestamp());
lastBuild.number = lb.getNumber();
builds.put(lastBuild);
return lastBuild;
}
@Override
public boolean isFingerprintConfigured() {
// TODO
......
......@@ -7,6 +7,7 @@ import java.io.IOException;
import java.util.Map;
import java.util.HashMap;
import java.util.List;
import java.util.Calendar;
import java.util.Map.Entry;
import org.kohsuke.stapler.StaplerRequest;
......@@ -23,6 +24,10 @@ public class MatrixRun extends Build<MatrixConfiguration,MatrixRun> {
super(job);
}
public MatrixRun(MatrixConfiguration job, Calendar timestamp) {
super(job, timestamp);
}
public MatrixRun(MatrixConfiguration project, File buildDir) throws IOException {
super(project, buildDir);
}
......
......@@ -15,6 +15,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Collections;
import java.util.Calendar;
/**
* A build of a {@link Project}.
......@@ -31,6 +32,10 @@ public abstract class Build <P extends Project<P,B>,B extends Build<P,B>>
super(project);
}
protected Build(P job, Calendar timestamp) {
super(job, timestamp);
}
/**
* Loads a build from a log file.
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册