Possible to post results in PR status message
I'm trying to have this plugin post the actual test results to the accompanying pull request when the job is complete.
Right now, it's posting the default output:
${GITHUB_PR_COND_REF}
run
ended
What I'd like to see is:
$failures / $total_tests tests failed
I haven't been able to find a place where this data is available.
Hi, comment step resolves variables according to existing job vars.There is no out of the box variables with test results. But you can get them injected with envinject from some property file that you can prepare with shell in workplace. Or with some groovy step by adding variable into build object from build's junit(?) test results. I also thought about implenting groovy message resolver like in https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin
Yeah, I realized after I posted this that the place where I'd get this information is from the JUnit plugin. I don't think it exports that information anywhere though. I can look at trying to export that information in one of my scripts.
There is https://github.com/jenkinsci/github-pr-coverage-status-plugin that based on ghprb, but it looks redundant as separate plugin. It would be good to get something similar for our internal projects, so at some time i will implement something similar here though i think groovy script may provide flexible configuration for future while static features are not implemented