Created
September 4, 2014 06:58
-
-
Save jollychang/c615f91f47f871108e21 to your computer and use it in GitHub Desktop.
Jenkins email macro.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type=""> | |
/** | |
* GitHub theme | |
* | |
* @author Craig Campbell | |
* @version 1.0.4 | |
*/ | |
pre { | |
border: 1px solid #ccc; | |
word-wrap: break-word; | |
padding: 6px 10px; | |
line-height: 19px; | |
margin-bottom: 20px; | |
} | |
code { | |
border: 1px solid #eaeaea; | |
margin: 0px 2px; | |
padding: 0px 5px; | |
font-size: 12px; | |
} | |
pre code { | |
border: 0px; | |
padding: 0px; | |
margin: 0px; | |
-moz-border-radius: 0px; | |
-webkit-border-radius: 0px; | |
border-radius: 0px; | |
} | |
pre, code { | |
font-family: Consolas, 'Liberation Mono', Courier, monospace; | |
color: #333; | |
background: #f8f8f8; | |
-moz-border-radius: 3px; | |
-webkit-border-radius: 3px; | |
border-radius: 3px; | |
} | |
pre, pre code { | |
font-size: 13px; | |
} | |
pre .comment { | |
color: #998; | |
} | |
pre .support { | |
color: #0086B3; | |
} | |
pre .tag, pre .tag-name { | |
color: navy; | |
} | |
pre .keyword, pre .css-property, pre .vendor-prefix, pre .sass, pre .class, pre .id, pre .css-value, pre .entity.function, pre .storage.function { | |
font-weight: bold; | |
} | |
pre .css-property, pre .css-value, pre .vendor-prefix, pre .support.namespace { | |
color: #333; | |
} | |
pre .constant.numeric, pre .keyword.unit, pre .hex-color { | |
font-weight: normal; | |
color: #099; | |
} | |
pre .entity.class { | |
color: #458; | |
} | |
pre .entity.id, pre .entity.function { | |
color: #900; | |
} | |
pre .attribute, pre .variable { | |
color: teal; | |
} | |
pre .string, pre .support.value { | |
font-weight: normal; | |
color: #d14; | |
} | |
pre .regexp { | |
color: #009926; | |
} | |
</style> | |
<script type="text/javascript"> | |
/** | |
* Generic language patterns | |
* | |
* @author Craig Campbell | |
* @version 1.0.10 | |
*/ | |
Rainbow.extend([ | |
{ | |
'matches': { | |
1: { | |
'name': 'keyword.operator', | |
'pattern': /\=/g | |
}, | |
2: { | |
'name': 'string', | |
'matches': { | |
'name': 'constant.character.escape', | |
'pattern': /\\('|"){1}/g | |
} | |
} | |
}, | |
'pattern': /(\(|\s|\[|\=|:)(('|")([^\\\1]|\\.)*?(\3))/gm | |
}, | |
{ | |
'name': 'comment', | |
'pattern': /\/\*[\s\S]*?\*\/|(\/\/|\#)[\s\S]*?$/gm | |
}, | |
{ | |
'name': 'constant.numeric', | |
'pattern': /\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi | |
}, | |
{ | |
'matches': { | |
1: 'keyword' | |
}, | |
'pattern': /\b(and|array|as|b(ool(ean)?|reak)|c(ase|atch|har|lass|on(st|tinue))|d(ef|elete|o(uble)?)|e(cho|lse(if)?|xit|xtends|xcept)|f(inally|loat|or(each)?|unction)|global|if|import|int(eger)?|long|new|object|or|pr(int|ivate|otected)|public|return|self|st(ring|ruct|atic)|switch|th(en|is|row)|try|(un)?signed|var|void|while)(?=\(|\b)/gi | |
}, | |
{ | |
'name': 'constant.language', | |
'pattern': /true|false|null/g | |
}, | |
{ | |
'name': 'keyword.operator', | |
'pattern': /\+|\!|\-|&(gt|lt|amp);|\||\*|\=/g | |
}, | |
{ | |
'matches': { | |
1: 'function.call' | |
}, | |
'pattern': /(\w+?)(?=\()/g | |
}, | |
{ | |
'matches': { | |
1: 'storage.function', | |
2: 'entity.name.function' | |
}, | |
'pattern': /(function)\s(.*?)(?=\()/g | |
} | |
]); | |
</script> | |
<script type="text/javascript"> | |
/** | |
* Python patterns | |
* | |
* @author Craig Campbell | |
* @version 1.0.9 | |
*/ | |
Rainbow.extend('python', [ | |
/** | |
* don't highlight self as a keyword | |
*/ | |
{ | |
'name': 'variable.self', | |
'pattern': /self/g | |
}, | |
{ | |
'name': 'constant.language', | |
'pattern': /None|True|False|NotImplemented|\.\.\./g | |
}, | |
{ | |
'name': 'support.object', | |
'pattern': /object/g | |
}, | |
/** | |
* built in python functions | |
* | |
* this entire list is 580 bytes minified / 379 bytes gzipped | |
* | |
* @see http://docs.python.org/library/functions.html | |
* | |
* @todo strip some out or consolidate the regexes with matching patterns? | |
*/ | |
{ | |
'name': 'support.function.python', | |
'pattern': /\b(bs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|bin|file|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern)(?=\()/g | |
}, | |
{ | |
'matches': { | |
1: 'keyword' | |
}, | |
'pattern': /\b(pass|lambda|with|is|not|in|from|elif|raise|del)(?=\(|\b)/g | |
}, | |
{ | |
'matches': { | |
1: 'storage.class', | |
2: 'entity.name.class', | |
3: 'entity.other.inherited-class' | |
}, | |
'pattern': /(class)\s+(\w+)\((\w+?)\)/g | |
}, | |
{ | |
'matches': { | |
1: 'storage.function', | |
2: 'support.magic' | |
}, | |
'pattern': /(def)\s+(__\w+)(?=\()/g | |
}, | |
{ | |
'name': 'support.magic', | |
'pattern': /__(name)__/g | |
}, | |
{ | |
'matches': { | |
1: 'keyword.control', | |
2: 'support.exception.type' | |
}, | |
'pattern': /(except) (\w+):/g | |
}, | |
{ | |
'matches': { | |
1: 'storage.function', | |
2: 'entity.name.function' | |
}, | |
'pattern': /(def)\s+(\w+)(?=\()/g | |
}, | |
{ | |
'name': 'entity.name.function.decorator', | |
'pattern': /@([\w\.]+)/g | |
}, | |
{ | |
'name': 'comment.docstring', | |
'pattern': /('{3}|"{3})[\s\S]*?\1/gm | |
} | |
]); | |
</script> | |
<script type="text/javascript"> | |
/* Rainbow v1.1.9 rainbowco.de */ | |
window.Rainbow=function(){function q(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b<a.length;++b)if("data-language"===a[b].nodeName)return a[b].nodeValue}return c}function B(a){var b=q(a)||q(a.parentNode);if(!b){var c=/\blang(?:uage)?-(\w+)/;(a=a.className.match(c)||a.parentNode.className.match(c))&&(b=a[1])}return b}function C(a,b){for(var c in e[d]){c=parseInt(c,10);if(a==c&&b==e[d][c]?0:a<=c&&b>=e[d][c])delete e[d][c],delete j[d][c];if(a>=c&&a<e[d][c]|| | |
b>c&&b<e[d][c])return!0}return!1}function r(a,b){return'<span class="'+a.replace(/\./g," ")+(l?" "+l:"")+'">'+b+"</span>"}function s(a,b,c,h){var f=a.exec(c);if(f){++t;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var k=f[0],i=f.index,u=f[0].length+i,g=function(){function f(){s(a,b,c,h)}t%100>0?f():setTimeout(f,0)};if(C(i,u))g();else{var m=v(b.matches),l=function(a,c,h){if(a>=c.length)h(k);else{var d=f[c[a]];if(d){var e=b.matches[c[a]],i=e.language,g=e.name&&e.matches? | |
e.matches:e,j=function(b,d,e){var i;i=0;var g;for(g=1;g<c[a];++g)f[g]&&(i=i+f[g].length);d=e?r(e,d):d;k=k.substr(0,i)+k.substr(i).replace(b,d);l(++a,c,h)};i?n(d,i,function(a){j(d,a)}):typeof e==="string"?j(d,d,e):w(d,g.length?g:[g],function(a){j(d,a,e.matches?e.name:0)})}else l(++a,c,h)}};l(0,m,function(a){b.name&&(a=r(b.name,a));if(!j[d]){j[d]={};e[d]={}}j[d][i]={replace:f[0],"with":a};e[d][i]=u;g()})}}else h()}function v(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort(function(a, | |
b){return b-a})}function w(a,b,c){function h(b,k){k<b.length?s(b[k].pattern,b[k],a,function(){h(b,++k)}):D(a,function(a){delete j[d];delete e[d];--d;c(a)})}++d;h(b,0)}function D(a,b){function c(a,b,h,e){if(h<b.length){++x;var g=b[h],l=j[d][g],a=a.substr(0,g)+a.substr(g).replace(l.replace,l["with"]),g=function(){c(a,b,++h,e)};0<x%250?g():setTimeout(g,0)}else e(a)}var h=v(j[d]);c(a,h,0,b)}function n(a,b,c){var d=m[b]||[],f=m[y]||[],b=z[b]?d:d.concat(f);w(a.replace(/</g,"<").replace(/>/g,">").replace(/&(?![\w\#]+;)/g, | |
"&"),b,c)}function o(a,b,c){if(b<a.length){var d=a[b],f=B(d);return!(-1<(" "+d.className+" ").indexOf(" rainbow "))&&f?(f=f.toLowerCase(),d.className+=d.className?" rainbow":"rainbow",n(d.innerHTML,f,function(k){d.innerHTML=k;j={};e={};p&&p(d,f);setTimeout(function(){o(a,++b,c)},0)})):o(a,++b,c)}c&&c()}function A(a,b){var a=a&&"function"==typeof a.getElementsByTagName?a:document,c=a.getElementsByTagName("pre"),d=a.getElementsByTagName("code"),f,e=[];for(f=0;f<d.length;++f)e.push(d[f]);for(f=0;f< | |
c.length;++f)c[f].getElementsByTagName("code").length||e.push(c[f]);o(e,0,b)}var j={},e={},m={},z={},d=0,y=0,t=0,x=0,l,p;return{extend:function(a,b,c){1==arguments.length&&(b=a,a=y);z[a]=c;m[a]=b.concat(m[a]||[])},b:function(a){p=a},a:function(a){l=a},color:function(a,b,c){if("string"==typeof a)return n(a,b,c);if("function"==typeof a)return A(0,a);A(a,b)}}}();document.addEventListener?document.addEventListener("DOMContentLoaded",Rainbow.color,!1):window.attachEvent("onload",Rainbow.color); | |
Rainbow.onHighlight=Rainbow.b;Rainbow.addClass=Rainbow.a; | |
</script> | |
<h3>本次unittest失败的case:</h3> | |
<pre><code data-language="python"> | |
${FAILED_TESTS, maxTests=10} | |
</code></pre> | |
<h3>到这里查看unittest结果:</h3> | |
<pre> | |
${BUILD_URL}testReport/ | |
</pre> | |
<h3>子项目提交人列表:</h3> | |
<pre> | |
${FILE, path="subproject.committers"} | |
</pre> | |
<pre> | |
$DEFAULT_CONTENT | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment