Details
-
Improvement
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
Description
Currently you have to import all the content token plugins you want to use, create an instance and then call the getContent method to use the email-ext tokens in a groovy template. It would be nice to have an easier method to do this, where you could do something like:
ENV(var: 'MY_VAR')
To use the ENV content token.
Code changed in jenkins
User: Alex Earl
Path:
src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
src/main/java/hudson/plugins/emailext/ExtendedEmailPublisherDescriptor.java
src/main/java/hudson/plugins/emailext/ScriptSandbox.java
src/main/java/hudson/plugins/emailext/plugins/ContentBuilder.java
src/main/java/hudson/plugins/emailext/plugins/EmailTrigger.java
src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java
src/main/resources/hudson/plugins/emailext/ExtendedEmailPublisher/config.groovy
src/main/resources/hudson/plugins/emailext/templates/email-ext.groovy
http://jenkins-ci.org/commit/email-ext-plugin/88aa3db61db603ff31acfa6844e15fba200bd5b7
Log:
Fix
JENKINS-16916be used like ${ENV(var: "BUILD_ID")} in the groovy template