From 0284be4734b7932fc12309c2a94111fdc3c86f88 Mon Sep 17 00:00:00 2001 From: Larry Cai Date: Sat, 31 Mar 2012 17:30:42 +0800 Subject: [PATCH] add sample html file with its groovy template it works fine under git --- .../emailext/templates/groovy-html-larry.html | 129 +++++++++++++++++ .../templates/groovy-html-larry.template | 131 ++++++++++++++++++ 2 files changed, 260 insertions(+) create mode 100644 src/main/resources/hudson/plugins/emailext/templates/groovy-html-larry.html create mode 100644 src/main/resources/hudson/plugins/emailext/templates/groovy-html-larry.template diff --git a/src/main/resources/hudson/plugins/emailext/templates/groovy-html-larry.html b/src/main/resources/hudson/plugins/emailext/templates/groovy-html-larry.html new file mode 100644 index 000000000..a343451e0 --- /dev/null +++ b/src/main/resources/hudson/plugins/emailext/templates/groovy-html-larry.html @@ -0,0 +1,129 @@ + + + + +Build from Jenkisn + + + +
+

+ Do you like new format of build information? give me feedback +

+
+
+ +
+
+

The build success

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Project:email-test
Build #107http://localhost:7080/jenkins/job/email-test/107/
Date of build:Thu, 22 Mar 2012 17:06:23 +0800
Build duration:0.52 sec
Changeshttp://localhost:7080/jenkins/job/email-test/107/changes
 
+ +
+ + + + +
+ Changes in detail: +
    +
  1. add groovy template more (larry.cai)(detail) +
  2. +
  3. update to first stable version (larry.cai)(detail) +
  4. +
  5. add image link to its id (larry.cai)(detail) +
  6. +
+
+ +
...
+
+ + + + + + + + + + +
+ + You are receiving this email because you + are relavent with this build
+

+ support team | Gerrit server +

+
designed by @larrycaiyu & @haojii  
+ + + + + \ No newline at end of file diff --git a/src/main/resources/hudson/plugins/emailext/templates/groovy-html-larry.template b/src/main/resources/hudson/plugins/emailext/templates/groovy-html-larry.template new file mode 100644 index 000000000..6c2092ce6 --- /dev/null +++ b/src/main/resources/hudson/plugins/emailext/templates/groovy-html-larry.template @@ -0,0 +1,131 @@ + + + +
+

+ Do you like new format of build information? give me feedback +

+
+
+
+
+

The build <%= build.result.toString().toLowerCase() %>

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Project:${project.name}
Build ${build.displayName}:${rooturl}${build.url}
Date of build:${it.timestampString}
Build duration:${build.durationString}
Changes${rooturl}${build.url}changes
 
+ +
+ + <% def artifacts = build.artifacts + if(artifacts != null && artifacts.size() > 0) { %> + +
+ Build Artifacts: +
    + <% artifacts.each() { f -> %> +
  • ${f}
  • + <% } %> +
+
+ <% } %> + + + <% def changeSet = build.changeSet + if(changeSet != null) { + def hadChanges = false + def count = 0 %> + +
+ Changes in detail: +
    + <% changeSet.each() { cs -> + hadChanges = true + def aUser = cs.author %> +
  1. ${cs.msgAnnotated} (${aUser.displayName}) + (detail)
  2. + <% count ++ + } %> +
+
+ <% } %> + +
+ + + + + + + + + + +
+ + You are receiving this email because you + are relavent with this build
+

+ support team | Gerrit server +

+
designed by @larrycaiyu & @haojii  
+ + +