May be this code might helped u as i had similar requirement but i implemented
it in groovy script
<!-- CHANGE SET -->
<% changeSet = build.changeSet
if (changeSet != null) {
hadChanges = false %>
<h2>Changes</h2>
<ul>
<% changeSet.each { cs ->
hadChanges = true
aUser = cs.author %>
<li>Commit <b>${cs.revision}</b> by <b><%= aUser != null ? aUser.displayName :
it.author.displayName %>:</b> (${cs.msg})
<ul>
<% cs.affectedFiles.each { %>
<li class="change-${it.editType.name}"><b>${it.editType.name}</b>: ${it.path}
</li> <% } %> </ul> </li> <% }
if (!hadChanges) { %>
<li>No Changes !!</li>
<% } %> </ul> <% } %>
*And regarding the count u cant use this*
*def size= build.changeSet.items.length*
On Monday, 17 October 2016 20:36:33 UTC+5:30, [email protected] wrote:
>
> Hi,
> I have use the Jelly template to re enable most of our email content,
> except 2 things I still cannot do, the revision change set and the warnings
> counts (the later is not too bad, we are moving to warnings as errors
> anyway).
>
> Any body have a way to access the scm changeSet into the pipeline emailext
> template?
>
> I tried without any luck:
>
> - ${build.changeSet}
> - ${build.changeSets}
> - ${currentBuild.changeSets}
> - ${manager.build.changeSets}
> - ${manager.build.changeSet}
>
> the console log are accessible with ${build.getLog()}
> the artifacts are with ${build.artifacts}
>
> The warning were:
> ${WARNINGS_RESULT()}
> ${WARNINGS_COUNT()}
> ${WARNINGS_NEW()}
> ${WARNINGS_FIXED()}
>
> but now if used they generate a jelly parsing error.
>
> if any body have any tips or info on this I would be glad,
> Thanks
> Jerome
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/565f9013-59e1-4cea-b75f-57c712b130d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.