Since both the things you want to integrate with have CLI interfaces, you can just call their CLIs using an sh
action in the Jenkinsfile
to call a shell command. Here's an example from the Clover PHP docs:
sh "phpunit --log-junit 'reports/unitreport.xml' --coverage-html 'reports/coverage' --coverage-clover 'reports/coverage/coverage.xml' test/"
The location for the Junit log will vary depending on where you put in your project. You must run a junit
step before this runs.
Checkstyle also has a CLI that you can call in a similar way from an sh
action in your Jenkinsfile
.
As long as you archive the resulting HTML files with your build, you can read the resulting HTML files by navigating to them through the "Build Artifacts" link on the build page. An example URL structure might look like:
https://ci.example.com/job/develop/342/artifact/reports/coverage/index.html
For deeper integration, the tools may need explicit Jenkins Pipeline support.