<!-- 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>
Collection<org.jenkinsci.plugins.pipeline.maven.MavenArtifact> generatedArtifacts = build.getAction(org.jenkinsci.plugins.pipeline.maven.publishers.MavenReport.class).getGeneratedArtifacts();
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/sPAYLh1W1cM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f4ea394b-824e-4ba7-8664-46b205bb523d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
pipeline side invoke the method
env.DEPLOYEDARTIFACTS = getDeployedArtifacts()
@NonCPSdef 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
<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 />
To unsubscribe from this group and all its topics, send an email to jenkins...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f4ea394b-824e-4ba7-8664-46b205bb523d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to jenkins...@googlegroups.com.