Are your projects located in GitHub? Then it would be quite easy to report 
results automatically using the GitHub checks plugin. Email is quite old-school 
when it comes to build result reporting... 

> Am 09.04.2021 um 13:58 schrieb jesus fernandez <jesusfernandez0...@gmail.com>:
> 
> Thanks for asering. I have been checking the javadoc of the plugin 
> https://javadoc.jenkins.io/plugin/email-ext/ but my java knowledge is super 
> basic and I do not get to see where the methods available to Jenkins are. So 
> I guess this is too advanced for me ATM
> 
> El viernes, 9 de abril de 2021 a las 13:48:03 UTC+2, ullrich...@gmail.com 
> escribió:
> You need to read the code of the plugin. I.e., the model of the producer 
> plugin.
> 
> 
> 
>> Am 09.04.2021 um 13:08 schrieb jesus fernandez <jesusfern...@gmail.com 
>> <applewebdata://CD386687-8AC2-4D0B-AEC4-B562F52DC1D1>>:
>> 
> 
>> I am learning Jenkins on my own and I am trying to learn about plugins. I 
>> have a stage to send an email with the cppcheck results with a template I 
>> found 
>> https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin
>>  
>> <https://stackoverflow.com/questions/13888338/sending-cppcheck-result-report-on-email-from-jenkins-using-email-ext-plugin>
>>  the template instantiate the ```CppcheckBuildAction``` and access its 
>> methods, what I would like to know if is possible to check what methods are 
>> avaialable for that instance and if possible how / where I can see them.
>> Also how could I for example echo / println one of them. For instance in the 
>> template provided in the link above it acces the total number of errors with 
>> ${cppcheckResult.report.getNumberTotal()} but if I echo it I get an error 
>> ```groovy.lang.MissingPropertyException: No such property: cppcheckResult 
>> for class: groovy.lang.Binding```, this is what I tried
>> stage('Email') {
>> steps {
>> script{
>> publishCppcheck pattern:'cppcheck.xml'
>> emailext( subject: 'foo', to: 'ma...@mail.net 
>> <applewebdata://CD386687-8AC2-4D0B-AEC4-B562F52DC1D1>', body: 
>> '${JELLY_SCRIPT, template="custom"}')
>> }
>> echo "${cppcheckResult.report.getNumberTotal()}"
>> }
>> }
>> my final goal actually is to send the email just when the report find a new 
>> error so I was thinking to save the total number of errors in an external 
>> file and compare it with each build and if the number is bigger send the 
>> email, is there any native / easier way to do this?
>> 
> 
>> -- 
>> 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 
>> <applewebdata://CD386687-8AC2-4D0B-AEC4-B562F52DC1D1>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/901e41a0-e2ec-466c-87a9-23d6082897e1n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/901e41a0-e2ec-466c-87a9-23d6082897e1n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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 
> <mailto:jenkinsci-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/48090815-12d1-4f8a-a15b-2d0c0185b830n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/48090815-12d1-4f8a-a15b-2d0c0185b830n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/AFDA6FF8-B7DF-4DAA-A046-7E063DC41E53%40gmail.com.

Reply via email to