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 <jesusfernandez0...@gmail.com>: > > 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: 'm...@mail.net', 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-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/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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/DE30733C-EF0D-4D21-B61C-BC6137A2CDF4%40gmail.com.