Hi All, 
i'm using jenkinsFile and for lone time using also the emailext plugin with 
some default params that were ok for now..

now i reached to some issues that i want to use in my groovy html template 
variables that were used in my jenkinsFile  - for example env variables.

its not clear to me how can i access them within the template..
the only thing i found online is the :
build.getEnvVars() but this one also give very limited info and not on my 
env variables that i used in my build..

in addition , see some examples online that use project.name or 
build.result ... how can i know which options i have to use in this 
template? 


on top of it:
in the jenkinsFile it self we have this section:

emailext(
        from: 'Jenkins',
        replyTo: 'none',
        recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 
'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
        subject: '[Jenkins] ${PROJECT_NAME} - build #${BUILD_NUMBER} - 
${BUILD_STATUS}',
        mimeType: 'text/html',
        to: '${GERRIT_CHANGE_OWNER_EMAIL}',
        body: '${SCRIPT, template="managed:groovy-html.template"}'
)


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}

what is your suggestion to handle these cases?


thanks in advance!

Amit

-- 
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/a788acb9-f1c2-4cc1-98b9-6437195c315d%40googlegroups.com.

Reply via email to