Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To reduce the usage of the database, disable the "Pipeline Graph Publisher" navigating to "Manage Jenkins / Global Tool Configuration / Pipeline Maven Configuration" then clicking on "Add Publisher Options", selecting "Pipeline Graph Publisher" and checking the "disabled" checkbox.

Image Modified

Anchor
mavenExecutionInterrupted
mavenExecutionInterrupted

...

No Format
class org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -> file:/var/lib/jenkins/plugins/my_plugin/WEB-INF/lib/xercesImpl-2.6.2.jar 

How to use Maven build data in generated emails

It is possible to use informations generated by Maven pipelines in emails generated by the Jenkins Email Ext Plugin.

See https://groups.google.com/forum/#!topic/jenkinsci-users/sPAYLh1W1cM

Code Block
languagegroovy
titleSample Pipeline code to expose artifact details in emails
env.DEPLOYEDARTIFACTS = getDeployedArtifacts()

@NonCPS
def getDeployedArtifacts() {
    def deployed = ''
    Collection<org.jenkinsci.plugins.pipeline.maven.MavenArtifact> generatedArtifacts = currentBuild.rawBuild.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts();
    for (org.jenkinsci.plugins.pipeline.maven.MavenArtifact generatedArtifact:generatedArtifacts) {
    	if (generatedArtifact.isDeployed()) {
    	   
    	    deployed= deployed.concat(generatedArtifact.getUrl())
    	    deployed = deployed.concat("===")
    	    deployed = deployed.concat(generatedArtifact.getShortDescription())
    	    deployed = deployed.concat(",") 
        }

    }
    return deployed
}


In EXT-MAIL-STANDARD-TEMPLATE

Code Block
languagexml
titleSample mail template using Maven build details
    <br />
    <!-- MAVEN ARTIFACTS -->
    <j:set var="mbuilds" value="${it.getAction('org.jenkinsci.plugins.workflow.cps.EnvActionImpl').getOverriddenEnvironment()}" />
        <h5>Deployed Artifacts</h5>
         <j:set var="generatedArtifacts" value="${mbuilds.get('DEPLOYEDArtifacts')}" />

       <table width="100%" style="font-family: Verdana, Helvetica, sans serif; font-size: 11px; color: black">
        <j:forEach var="artifacts" items="${generatedArtifacts.split(',')}" >
        <j:set var="artifact" value="${artifacts.split('===')}" />
         <tr bgcolor="white" >
          <td class="bg1" colspan="2" style="font-family: Verdana, Helvetica, sans serif; font-size: 120%; color: black">
          <li>
            <a href="${artifact[0]}">
            ${artifact[1]}
          </a>
          </li>
           </td>
         </tr>
         </j:forEach>
       </table>
 <br />


Known Limitations

Maven and JDK installation not supported in docker.image('xxx').inside{...}

...