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 here 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: '[email protected]', 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?
Most plugins should have a javadoc link. At bottom of plugin,should see javadoc
And then there's the Extension Index for core and plugins.