Templating inside a Groovy pipeline?

22 views
Skip to first unread message

Peter Berghold

unread,
Mar 9, 2018, 1:58:43 PM3/9/18
to Jenkins Users
Is there a text templating solution that works inside a Groovy pipeline?

I tried both SimpleTemplate and StreamingTemplate and both error out with an exception somewhere in the bowels of the class.  Am perhaps stuck with using a callout to a Perl script to get this to work? 


Slide

unread,
Mar 9, 2018, 11:43:49 PM3/9/18
to jenkins...@googlegroups.com
You can probably use those in a @NonCPS method inside a pipeline, that is how I am using it. I pass in all the information I need to the method and use templating inside and return the generated contents.

On Fri, Mar 9, 2018, 11:58 Peter Berghold <salty....@gmail.com> wrote:
Is there a text templating solution that works inside a Groovy pipeline?

I tried both SimpleTemplate and StreamingTemplate and both error out with an exception somewhere in the bowels of the class.  Am perhaps stuck with using a callout to a Perl script to get this to work? 


--
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/CAArvnv3dzoyoWFzoYEMcxWADW9FKxe9PvcVeEcv2w465vnX6YA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages