pipeline emailext template

77 views
Skip to first unread message

jer...@bodycad.com

unread,
Oct 14, 2016, 10:47:13 AM10/14/16
to Jenkins Users
Hi,
I have update to emailext 2.51 which seem to now support the template. but I failed to see how to use them or provide it to the emailext call??? I look at the http://myJenkinsserver/myproject/pipeline-syntax/html  but without any luck, the plugin only doc don't say much else then the problems is fix.

I would like to replace my manual template read and replace with it and use the old groovy template. Is this compatible with both groovy and Jelly template?  we used the groovy template before pipeline (as matter of fact multiple of them, but that's another story).

Any pointer of how and what to do to use it would be welcome.

I'm suspecting I can leave the token/script into the email body and subject and they will be parsed? so I could only read the template and give it to the emailext command? I would be trying to guess by trial and errors but if anybody have pointer that would be welcome.

Jerome

jer...@bodycad.com

unread,
Oct 14, 2016, 12:55:37 PM10/14/16
to Jenkins Users
just found some info and by trial and error:
emailext body: '${JELLY_SCRIPT,template="myFilePath.jelly"}'



I try the old groovy template without success. 
'${GROOVY_SCRIPT,template="myFilePath.template"}'  <-- does not work

I also found that Windows path are not supported \ are not compatible into the path, have to replace: mypath.replaceAll('\\', '/')

For the token I'm still checking if everything works but if this may help. Also, if a variable is not found, nothing seem to be output or only an error sometime. So I' putting back each block per block until I get everything back on track.


Slide

unread,
Oct 14, 2016, 1:15:15 PM10/14/16
to Jenkins Users

The groovy templates use just ${SCRIPT, template=""} not GROOVY_SCRIPT


--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6162c93a-c6ab-4f7c-99b5-3dde199a480e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jer...@bodycad.com

unread,
Oct 14, 2016, 1:30:43 PM10/14/16
to Jenkins Users
Sweet, thanks you slide for the info!
Reply all
Reply to author
Forward
0 new messages