Issue
We're using ghprb in all of our repos and it's great. I'd like to be able to add content to the post-build information displayed in git though. We use clover, findbugs, etc and most people are missing the output of these.
ghprb does great returning messages like
All is well — Build finished. n tests run, m skipped, k failed.
there's even a link back to the jenkins job there.
In the README it intimates that customizations are possible.
You can extend the standard build comment message on github creating a comment file from shell console or any other jenkins plugin. Contents of that file will be added to the comment on GitHub. This is useful for posting some build dependent urls for users without access to the jenkins UI console.
But no more detail after that. Has anyone managed to add / modify the default content?
Solution
Yes, You can specify any custom message to default content.
There is an option to mention a file whose content will be pasted as comment in pull request by job.
<commentFilePath>/home/jenkins/<Some Directory Name>/commit.log</commentFilePath>
You can mention what ever content in commit.log (or any file you are naming)..
Points to remember-> This file has to be on jenkins master, having file on slave is going to help you. So as pre/post build step you will need to create this file and populate the content,
For example
If you want to show cobertura graph to pull request commit you can add this.
echo "CodeCoverage Trend" > commit.log
echo "<img src="https://<Your servername>.com/job/${JOB_NAME}/cobertura/graph">" >> commit.log
Answered By - vishal sahasrabuddhe