*Hi Reinhold, *
*thank you for your help!*
*pls see inline*

בתאריך יום חמישי, 8 באוגוסט 2019 בשעה 07:45:34 UTC+3, מאת Reinhold Füreder:

> 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
>
>  this one worked   - tnx for that!
>
>  
>
> (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
>    
>  regard this part - i know these params but i'm sure that we can 
> manipulate the template in some way to have values that no on build... for 
> example , i have file in my workspace that contains all the values that i 
> want to use in the mail, will it be available in the post in the template? 
> can i import this file context into some map and use it in my email 
> template? 
>
 as i know , we have already the option to run build.getEnvVars() but only 
for specific values that inside build context - not the env values that i'm 
looking for...
do you see other option for it?

 

> 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/dfe5f429-b31f-4dac-af88-65c98f8806b6%40googlegroups.com.

Reply via email to