Skip to content
Permalink
Browse files

JENKINS-24450 JacocoPublisher serializes concurrent builds waiting fo…

…r checkpoint
  • Loading branch information
basil committed Aug 26, 2014
1 parent b1e2ad7 commit a4ac13b109d85f7d26e1d758dd9c510de7e6dd90
@@ -250,7 +250,7 @@ public JacocoBuildAction getPreviousResult() {
if(b==null) {
return null;
}
if(b.getResult()== Result.FAILURE || b.getResult() == Result.ABORTED) {
if (b.isBuilding() || b.getResult() == Result.FAILURE || b.getResult() == Result.ABORTED) {
continue;
}
JacocoBuildAction r = b.getAction(JacocoBuildAction.class);
@@ -39,7 +39,7 @@ public String getUrlName() {
*/
public JacocoBuildAction getLastResult() {
for (AbstractBuild<?, ?> b = project.getLastBuild(); b != null; b = b.getPreviousBuild()) {
if (b.getResult() == Result.FAILURE || b.getResult() == Result.ABORTED)
if (b.isBuilding() || b.getResult() == Result.FAILURE || b.getResult() == Result.ABORTED)
continue;
JacocoBuildAction r = b.getAction(JacocoBuildAction.class);
if (r != null)
@@ -404,7 +404,7 @@ public Action getProjectAction(AbstractProject<?, ?> project) {
}

public BuildStepMonitor getRequiredMonitorService() {
return BuildStepMonitor.BUILD;
return BuildStepMonitor.NONE;
}

@Override
@@ -84,7 +84,7 @@ private JacocoLoadData() {
// date range (last build date minus number of days)
for (Job job : jobs) {

Run run = job.getLastBuild();
Run run = job.getLastCompletedBuild();

if (null != run) {
LocalDate runDate = new LocalDate(run.getTimestamp());
@@ -94,6 +94,9 @@ private JacocoLoadData() {
summarize(summaries, run, runDate, job);

run = run.getPreviousBuild();
while (run != null && run.isBuilding()) {
run = run.getPreviousBuild();
}

if (null == run) {
break;
@@ -96,7 +96,7 @@ public static int validateChartAttributes(String attribute, int defaultValue) {
public static LocalDate getLastDate(List<Job> jobs) {
LocalDate lastDate = null;
for (Job<?,?> job : jobs) {
Run<?,?> lastRun = job.getLastBuild();
Run<?,?> lastRun = job.getLastCompletedBuild();
if (lastRun != null) {
LocalDate date = new LocalDate(lastRun.getTimestamp());
if (lastDate == null) {

0 comments on commit a4ac13b

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