/** * @param stringBuilder the string builder to which to add the matrix run representation * @param matrixRun the matrix run * @param indentLevel the indent level */ private void addMatrixRunRepresentation(final StringBuilder stringBuilder, final MatrixRun matrixRun, final int indentLevel) { final FailureCauseDisplayData data = FailureCauseMatrixBuildAction.getFailureCauseDisplayData(matrixRun); if (data.getFoundFailureCauses().isEmpty() && data.getDownstreamFailureCauses().isEmpty()) { return; } final int nextIndentLevel = indentLevel + LIST_INCREMENT; if (useHtmlFormat) { stringBuilder.append("<li>"); try { stringBuilder.append(Jenkins.getInstance().getMarkupFormatter().translate( matrixRun.getFullDisplayName())); } catch (final IOException exception) { stringBuilder.append("matrix-full-display-name"); } addFailureCauseDisplayDataRepresentation(stringBuilder, data, nextIndentLevel); stringBuilder.append("</li>"); } else { stringBuilder.append(indentForDepth(indentLevel)); stringBuilder.append(LIST_BULLET); stringBuilder.append(matrixRun.getFullDisplayName()); stringBuilder.append("\n"); addFailureCauseDisplayDataRepresentation(stringBuilder, data, nextIndentLevel); } }
@Override public void perform(Job _job) throws IOException, InterruptedException { // Let superclass handle clearing artifacts, if configured: super.perform(_job); if (!(_job instanceof MatrixConfiguration)) { LOGGER.log(Level.SEVERE, "Log rotator got a job with a wrong type. {0} of {1}", new Object[] {_job.getFullName(), _job.getClass()}); } MatrixConfiguration job = (MatrixConfiguration) _job; // copy it to the array because we'll be deleting builds as we go. for( MatrixRun r : job.getBuilds() ) { if(job.getParent().getBuildByNumber(r.getNumber())==null) { LOGGER.log(Level.FINE, "Deleting {0}", r.getFullDisplayName()); r.delete(); } } if(!job.isActiveConfiguration() && job.getLastBuild()==null) { LOGGER.log(Level.FINE, "Deleting {0} because the configuration is inactive and there''s no builds", job.getFullDisplayName()); job.delete(); } }
serve(req, rsp, run.getFullDisplayName(), CoveragePublisher.getHtmlDir(run), path); Entry entry = new Entry(run.getFullDisplayName(), configuration.getCombination().toString() + "/"); serve(req, rsp, run.getFullDisplayName(), CoveragePublisher.getHtmlDir(run), path);