Re: Inserting a Jelly template into a step

2021-09-28 Thread Victor Sudakov
'Björn Pedersen' via Jenkins Users wrote:
> >
> > Sorry for being dumb. I'm currently using the following simple step: 
> >
> > post { 
> > failure { 
> > emailext body: 'Check console output at $BUILD_URL to view the results', 
> > subject: ' 
> > } 
> > } 
> >
> > If I want to replace this simple oneliner with a Jelly template, where 
> > should 
> > I insert the ${JELLY_SCRIPT,template="text"} variable? I've tried the 
> > following: 
> >
> > emailext body: '${JELLY_SCRIPT,template="text"}', subject: ' 
> >
> >
> did you mena template="html" ?

The presence of a text/plain part is required. If template="html" can
provide both a text/plain and a text/html part (like multipart mails
from CircleCI), then yes. Otherwise I'll have to use template="text".

>  
> 
> > But it resulted in a very laconic mail body: 
> >
> >
> Seems like that is correct for the text template. 

OK, thank you for confirmation.

> Many things in the output 
> will only be there if you also have the correct 
> steps in your pipeline ( cobertura coverage, junit results). 

Sounds kind of excessive. I just wanted to see some useful things in
the mail body, like the commit messages, committer name etc (this info
is already available in the web interface for every build). Maybe the
tail of the build log too.


> And as some of 
> those are outdated you probably need to
>  write your own template to use the newer replacement versions.

Maybe you know of a repo of mail templates somewhere?


-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet

-- 
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/YVMay7rXsnUz0vBK%40admin.sibptus.ru.


Re: Inserting a Jelly template into a step

2021-09-28 Thread 'Björn Pedersen' via Jenkins Users


Victor Sudakov schrieb am Dienstag, 28. September 2021 um 09:21:26 UTC+2:

> Hello Colleagues, 
>
> Sorry for being dumb. I'm currently using the following simple step: 
>
> post { 
> failure { 
> emailext body: 'Check console output at $BUILD_URL to view the results', 
> subject: ' 
> } 
> } 
>
> If I want to replace this simple oneliner with a Jelly template, where 
> should 
> I insert the ${JELLY_SCRIPT,template="text"} variable? I've tried the 
> following: 
>
> emailext body: '${JELLY_SCRIPT,template="text"}', subject: ' 
>
>
did you mena template="html" ?
 

> But it resulted in a very laconic mail body: 
>
>
Seems like that is correct for the text template. Many things in the output 
will only be there if you also have the correct 
steps in your pipeline ( cobertura coverage, junit results). And as some of 
those are outdated you probably need to
 write your own template to use the newer replacement versions.

Björn

-- 
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/b264603a-f0ac-4940-a79e-5883759ef10fn%40googlegroups.com.


Inserting a Jelly template into a step

2021-09-28 Thread Victor Sudakov
Hello Colleagues,

Sorry for being dumb. I'm currently using the following simple step:

post {
failure {
emailext body: 'Check console output at $BUILD_URL to view the 
results', subject: '
}
}

If I want to replace this simple oneliner with a Jelly template, where should
I insert the ${JELLY_SCRIPT,template="text"} variable? I've tried the following:

emailext body: '${JELLY_SCRIPT,template="text"}', subject: '

But it resulted in a very laconic mail body:

==
GENERAL INFO
BUILD FAILURE
Build URL: https://jenkins.
Project: 
Date of build: Tue, 28 Sep 2021 05:08:28 +  
 
Build duration: 1 min 36 sec and counting
==

Which is not at all like the lush message on the 
email-ext-plugin docs screenshots.

What am I doing wrong?

Jenkins 2.303.1, Email Extension Plugin 2.83

-- 
Victor Sudakov VAS4-RIPE
http://vas.tomsk.ru/
2:5005/49@fidonet

-- 
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/YVKlxvsBfa5aYj8q%40admin.sibptus.ru.