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
def changeLogSets = currentBuild.changeSets
for (int i = 0; i < changeLogSets.size(); i++) { ... replace into the template file text for each line into html format string...}
![]() |
| ||||||||||||
The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential and/or privileged information and may be legally protected from disclosure. If you are not the intended recipient of this message or their agent, or if this message has been addressed to you in error, please immediately alert the sender by reply email and then delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited. |
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a82ee9f8-e59e-4e11-9a77-0d57bbb1e352%40googlegroups.com.--
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/mIzYWDmMKGM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.