Hi,

Oh, email-ext, one of my current favorite topics....
I am calling it a little differently and that's working (for me it's jelly 
instead of groovy but groovy worked before also):

def mailbody = '${JELLY_SCRIPT, template="template.jelly"}'
def mailsubject = 'Jenkins Build ' + currentBuild.fullDisplayName + ' 
finished: ' + currentBuild.currentResult
emailext attachLog: false, body: mailbody, recipientProviders: [culprits(), 
brokenTestsSuspects(), brokenBuildSuspects(), upstreamDevelopers()], 
subject: mailsubject

Anyone familiar with that problem: 
"JellyException: Could not parse Jelly script : null"?

I found several solutions to support developing the jelly script:
- the email-ext template-testing link in the job page: not working with 
scripted pipeline
- a couple lines of groovy script for the script console to trigger new 
email execution from a finished job: not working due to syntax problems and 
obviously made for a lot older API
- a lot of published jelly-script snippets to add output from the one and 
other plugin: a lot of syntax errors everywhere

What's the latest best way to develop this stuff? 
Is there any way to trigger exeuction based on an existing job? 
Any way to get that origniating parser exception to find the real issue?

BR,
Christoph
Zach Hurlburt schrieb am Donnerstag, 18. April 2024 um 19:40:18 UTC+2:

>
> I am trying to find a way to override the default groovy-html.template for 
>> email-ext.
>>
>> The main reason is because we have several declarative pipelines that use 
>> a post action for catching build failures as such:
>>
>> ```
>>                 emailext attachLog: true, body: '''${SCRIPT, 
>> template="groovy-html.template"}''',
>>                 subject: '[ITCO] Failure: ${JOB_NAME}',
>>                 to: 'ema...@domain.com',
>>                 mimeType: 'text/html'
>>
>> ```
>>
>> I tried placing the exact same name of the template 
>> *groovy-html.template* in ${JENKINS_HOME}\email-templates but it doesn't 
>> look like it gets used.
>>
>> Outside of naming this template to something else, does anyone have any 
>> ideas?
>>
>> Thanks
>>
>
> Zach
>
>>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f9cbbd11-4532-414a-828d-7a7da55c2694n%40googlegroups.com.

Reply via email to