Skip to content
Permalink
Browse files

Merge pull request #28 from masterhard/jenkins-18003

[FIXED JENKINS-18003]
  • Loading branch information...
ndeloof committed May 18, 2013
2 parents 277fb8f + 6e09ecc commit b9628afa8ff725cf2933e649b1a09995953bb764
@@ -87,7 +87,7 @@ public class JobInvocation {

public Result getResult() throws ExecutionException, InterruptedException {
waitForCompletion();
return build.getResult();
return getBuild().getResult();
}

public String getResultString() throws ExecutionException, InterruptedException {
@@ -96,8 +96,8 @@ public class JobInvocation {

public String getColorForHtml() {
BallColor color = BallColor.NOTBUILT;
if (build != null) {
color = build.getIconColor();
if (getBuild() != null) {
color = getBuild().getIconColor();
}
return color.getHtmlBaseColor();
}
@@ -153,16 +153,16 @@ public class JobInvocation {
}

public String getBuildUrl() {
return this.build != null ? this.build.getAbsoluteUrl() : null;
return this.getBuild() != null ? this.getBuild().getAbsoluteUrl() : null;
}

public String getStartTime() {
String formattedStartTime = "";
if (build.getTime() != null) {
if (getBuild().getTime() != null) {
formattedStartTime = DateFormat.getDateTimeInstance(
DateFormat.SHORT,
DateFormat.SHORT)
.format(build.getTime());
.format(getBuild().getTime());
}
return formattedStartTime;
}
@@ -52,9 +52,9 @@

private String dsl;

private JobInvocation.Start startJob = new JobInvocation.Start(this);
private JobInvocation.Start startJob;

private DirectedGraph<JobInvocation, JobEdge> jobsGraph = new SimpleDirectedGraph<JobInvocation, JobEdge>(JobEdge.class);
private DirectedGraph<JobInvocation, JobEdge> jobsGraph;

private transient ThreadLocal<FlowState> state = new ThreadLocal<FlowState>();

@@ -71,6 +71,12 @@ public FlowRun(BuildFlow job) throws IOException {
}

private void setup(BuildFlow job) {
if (jobsGraph == null) {
jobsGraph = new SimpleDirectedGraph<JobInvocation, JobEdge>(JobEdge.class);
}
if (startJob == null) {
startJob = new JobInvocation.Start(this);
}
this.dsl = job.getDsl();
startJob.buildStarted(this);
jobsGraph.addVertex(startJob);

0 comments on commit b9628af

Please sign in to comment.
You can’t perform that action at this time.