Hi Amit,

(a) in your code/screenshot example the problem:
to: '${GERRIT_CHANGE_OWNER_EMAIL}',
[…]

in the to: section i want to use the env variable "GERRIT_CHANGE_OWNER_EMAIL" 
but it not passing the value  ( i tried also with env.GERRIT_CHANGE_OWNER_EMAIL 
and also /${env.GERRIT_CHANGE_OWNER_EMAIL}
… the problem is a Groovy one:

  *   Please replace the single quotes with double quotes to allow string 
interpolation


(b) And in the groovy html template code there are IMHO only certain variables 
explicitly injected:

  *   Based upon http://stackoverflow.com/a/9983405 and 
https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/java/hudson/plugins/emailext/plugins/content/ScriptContent.java
 please note the “binding.put(...)” calls, e.g.:
     *   build ... 
org.jenkinsci.plugins.workflow.job.WorkflowRun<http://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins/workflow/job/WorkflowRun.html>
 for Pipeline jobs
     *   project == 
build.getParent()<http://javadoc.jenkins-ci.org/hudson/model/Run.html#getParent%28%29>
 ... 
org.jenkinsci.plugins.workflow.job.WorkflowJob<http://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins/workflow/job/WorkflowJob.html>
 - the job/project instance for this build
     *   it ... 
ScriptContentBuildWrapper(build)<https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/java/hudson/plugins/emailext/plugins/content/ScriptContentBuildWrapper.java>
 (internal ExtEmail class)
     *   rootUrl … Jenkins URL as set in your Jenkins configuration

HTH Reinhold

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/AM0PR01MB6147232554C60333C07B17DDF7D70%40AM0PR01MB6147.eurprd01.prod.exchangelabs.com.

Reply via email to