Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35385

Findbug issue - Not able to see list of committers.

XMLWordPrintable

      We have recently migrated our jenkins to 1.622 version and I have findbug project set. While showing findbug results in email using below jelly template, "Find Bugs warnings info" section shows error message as "Find Bugs Publisher did not get invoked due to an error". But I do not see any error in console.

      Also, "New Warnings" section is not showing up. It looks that fb variable is null and no results are showing up in email template.

      Even the change sets section is not visible.

      Is there any setting missing for findbug in Jenkins required to show up these results.

      <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
      <html>
      <head>
      <title>${project.name}</title>
      <style>
      body table, td, th, p, h1, h2

      { margin:0; font:normal normal 90% Georgia, Serif; background-color: #ffffff; }

      h1, h2

      { border-bottom:dotted 1px #999999; padding:5px; margin-top:10px; margin-bottom:10px; color: #000000; font: normal bold 90% Georgia,Serif; background-color:#f0f0f0; }

      </style>
      </head>
      <body>
      <div class="header">
      <j:set var="spc" value="&nbsp;&nbsp;" />
      <h1>
      <j:choose>
      <j:when test="${build.result=='SUCCESS'}">
      <img src="${rooturl}static/e59dfe28/images/32x32/blue.gif" />
      </j:when>
      <j:when test="${build.result=='FAILURE'}">
      <img src="${rooturl}static/e59dfe28/images/32x32/red.gif" />
      </j:when>
      <j:otherwise>
      <img
      src="${rooturl}static/e59dfe28/images/32x32/yellow.gif" />
      </j:otherwise>
      </j:choose>
      BUILD ${build.result}
      </h1>
      <table>
      <tr>
      <td>Build URL</td>
      <td>
      <a href="${rooturl}${build.url}">${rooturl}${build.url}</a>
      </td>
      </tr>
      <tr>
      <td>Project:</td>
      <td>${project.name}</td>
      </tr>
      <tr>
      <td>Date of build:</td>
      <td>${it.timestampString}</td>
      </tr>
      <tr>
      <td>Build duration:</td>
      <td>${build.durationString}</td>
      </tr>
      <tr>
      <td>Build cause:</td>
      <td>
      <j:forEach var="cause" items="${build.causes}">${cause.shortDescription}
      </j:forEach>
      </td>
      </tr>
      <tr>
      <td>Build description:</td>
      <td>${build.description}</td>
      </tr>
      <tr>
      <td>Built on:</td>
      <td>
      <j:choose>
      <j:when test="${build.builtOnStr!=''}">${build.builtOnStr}
      </j:when>
      <j:otherwise>master</j:otherwise>
      </j:choose>
      </td>
      </tr>
      </table>
      </div>
      <!-- Static Analysis -->
      <j:set var="actions" value="${it.staticAnalysisActions}" />
      <j:if test="${!actions.isEmpty()}">
      <div class="content">
      <h1>Static Analysis Results</h1>
      <table>
      <tr>
      <th></th>
      <th>Name</th>
      <th>Result</th>
      <th>Total</th>
      <th>High</th>
      <th>Normal</th>
      <th>Low</th>
      </tr>
      <j:forEach var="action" items="${actions}">
      <tr>
      <td>
      <img src="${rooturl}${action.smallImageName}" />
      </td>
      <td>
      <a href="${rooturl}${build.url}/${action.urlName}">${action.displayName}
      </a>
      </td>
      <td class="center">
      <j:choose>
      <j:when test="${action.result.pluginResult=='SUCCESS'}">
      <img src="${rooturl}static/e59dfe28/images/16x16/blue.gif" />
      </j:when>
      <j:when test="${action.result.pluginResult=='FAILURE'}">
      <img src="${rooturl}static/e59dfe28/images/16x16/red.gif" />
      </j:when>
      <j:otherwise>
      <img src="${rooturl}static/e59dfe28/images/16x16/yellow.gif" />
      </j:otherwise>
      </j:choose>
      </td>
      <td class="center">${action.result.numberOfAnnotations}
      </td>
      <td class="center">${action.result.getNumberOfAnnotations('HIGH')}
      </td>
      <td class="center">${action.result.getNumberOfAnnotations('NORMAL')}
      </td>
      <td class="center">${action.result.getNumberOfAnnotations('LOW')}
      </td>
      </tr>
      </j:forEach>
      </table>
      </div>
      </j:if>
      <!-- More Find bugs info-->
      <j:set var="fb" value="${it.getAction('hudson.plugins.findbugs.FindBugsResultAction')}" />
      <div class="content">
      <h1>Find Bugs warnings info</h1>
      <table width="100%">
      <tr>
      <th>Total</th>
      <th>Fixed</th>
      <th>New</th>
      <th >Report</th>
      </tr>
      <tr>
      <td class="center">${fb.result.numberOfWarnings}</td>
      <td class="center">${fb.result.numberOfFixedWarnings}</td>
      <td class="center">${fb.result.numberOfNewWarnings}</td>
      <td class="center"><a href="${rooturl}${build.url}/findbugsResult">View Report</a></td>
      </tr>
      </table>
      </div>
      <j:set var="newWarnings" value="${fb.result.newWarnings}" />
      <j:if test="${newWarnings!=null}">
      <div class="content">
      <h1>New warnings</h1>
      <table width="100%" class="newWarningsborder">
      <tr>
      <th width="20%" class="newWarningsborder">Name</th>
      <th width="5%" class="newWarningsborder">Line</th>
      <th width="*" class="newWarningsborder">Message</th>
      </tr>
      <j:forEach var="fileAnnotation" items="${newWarnings}" varStatus="loop">
      <tr>
      <td width="20%" class="newWarningsborder">${fileAnnotation.shortFileName}</td>
      <td width="5%" class="newWarningsborder">${fileAnnotation.primaryLineNumber}</td>
      <td width="*" class="newWarningsborder">${fileAnnotation.message}</td>
      </tr>
      </j:forEach>
      </table>
      </div>
      </j:if>
      <!-- CHANGE SET -->
      <div class="content">
      <j:set var="changeSet" value="${build.changeSet}" />
      <j:if test="${changeSet!=null}">
      <j:set var="hadChanges" value="false" />
      <a href="${rooturl}${build.url}/changes">
      <h1>Changes</h1>
      </a>
      <j:forEach var="cs" items="${changeSet.logs}" varStatus="loop">
      <j:set var="hadChanges" value="true" />
      <h2>${cs.msgAnnotated}</h2>
      <p>
      by
      <em>${cs.author}</em>
      </p>
      <table>
      <j:forEach var="p" items="${cs.affectedFiles}">
      <tr>
      <td width="10%">${spc}${p.editType.name}</td>
      <td>
      <tt>${p.path}</tt>
      </td>
      </tr>
      </j:forEach>
      </table>
      </j:forEach>
      <j:if test="${!hadChanges}">
      <p>No Changes</p>
      </j:if>
      <br />
      </j:if>
      </div>
      <!-- ARTIFACTS -->
      <j:set var="artifacts" value="${build.artifacts}" />
      <j:if test="${artifacts!=null and artifacts.size()>0}">
      <div class="content">
      <h1>Build Artifacts</h1>
      <ul>
      <j:forEach var="f" items="${artifacts}">
      <li>
      <a href="${rooturl}${build.url}artifact/${f}">${f}</a>
      </li>
      </j:forEach>
      </ul>
      </div>
      </j:if>
      <!-- MAVEN ARTIFACTS -->
      <j:set var="mbuilds" value="${build.moduleBuilds}" />
      <j:if test="${mbuilds!=null}">
      <div class="content">
      <h1>Build Artifacts</h1>
      <j:forEach var="m" items="${mbuilds}">
      <h2>${m.key.displayName}</h2>
      <j:forEach var="mvnbld" items="${m.value}">
      <j:set var="artifacts" value="${mvnbld.artifacts}" />
      <j:if test="${artifacts!=null and artifacts.size()>0}">
      <ul>
      <j:forEach var="f" items="${artifacts}">
      <li>
      <a href="${rooturl}${mvnbld.url}artifact/${f}">${f}</a>
      </li>
      </j:forEach>
      </ul>
      </j:if>
      </j:forEach>
      </j:forEach>
      <br />
      </div>
      </j:if>
      </body>
      </html>

            davidvanlaatum David van Laatum
            kkn kk nn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: