Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Jenkins 46818 msg for text template (#160)
* Correc use of build.changeSets

Fixes wrong variable name in template
which was failing rendering of template.

JENKINS-38968

* Fixed changeSets in groovy-text.tempalte
  • Loading branch information
ssbarnea authored and davidvanlaatum committed Sep 14, 2017
1 parent 1d6cf43 commit 9cd308d
Showing 1 changed file with 10 additions and 8 deletions.
@@ -1,23 +1,25 @@
GENERAL INFO

BUILD ${build.result}
BUILD ${build.result ?: 'SUCCESSFUL'}
Build URL: ${rooturl}${build.url}
Project: ${project.name}
Date of build: ${it.timestampString}
Build duration: ${build.durationString}

<%
def changeSet = build.changeSet
if(changeSet != null) {
<%
def changeSets = build.changeSets
if(changeSets != null) {
def hadChanges = false %>
CHANGE SET
<% changeSet.each() { cs ->
<% changeSets.each() { cs_list ->
cs_list.each() { cs ->
hadChanges = true %>
Revision <%= cs.metaClass.hasProperty('commitId') ? cs.commitId : cs.metaClass.hasProperty('revision') ? cs.revision :
Revision <%= cs.metaClass.hasProperty('commitId') ? cs.commitId : cs.metaClass.hasProperty('revision') ? cs.revision :
cs.metaClass.hasProperty('changeNumber') ? cs.changeNumber : "" %> by <%= cs.author %>: (<%= cs.msgAnnotated %>)
<% cs.affectedFiles.each() { p -> %>
change: <%= p.editType.name %> <%= p.path %>
<% }
<% }
}
}
if(!hadChanges) { %>
No changes
Expand All @@ -30,4 +32,4 @@ CONSOLE OUTPUT
<% build.getLog(100).each() { line -> %>
${line}
<% }
} %>
} %>

0 comments on commit 9cd308d

Please sign in to comment.