Jenkins Email Template Jelly 中获取当前环境变量 build git branch
<j:set var="buildenv" value="${build.getEnvironment(listener)}"/>
<j:set var="branch" value="${buildenv.get('GIT_BRANCH')}"/>
${branch}Environment variables The git plugin sets several environment variables you can use in your scripts: https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
ref:
新发现的模板: https://gist.githubusercontent.com/lvdaqian/10349704/raw/0c0402143a0ea1f9e6666233f32b8f0818eede99/jenkins-email-ext-clangScanReport-template.jelly
ref: http://www.gibar.co/2014/10/email-ext-plugin.html