The templates and examples provided by the email-ext plugin on jenkins reference variables such as build, root, it
, etc.... Where are these variables coming from and where is the documentation on them? I understand to some extent that it
is the reference to the plugin instance, but that's about where my understanding ends.
If you need reference to the scripts you can see some examples here: https://github.com/jenkinsci/email-ext-plugin/tree/master/src/main/resources/hudson/plugins/emailext/templates
build
: hudson.model.AbstractBuild - your build instance.
project
== build.getParent() - the job instance for your build.
it
: ScriptContentBuildWrapper(build)
(internal ExtEmail class)
rootUrl
Jenkins URL as set in your Jenkins configuration
template
: template name
Here is EmailExt plugin code link. What you are looking for is in the method ScriptContent.createEngine().
For reference, here is Jenkins API link.